From 60c25aa6905d711030a721653c33a4a602c23d3b Mon Sep 17 00:00:00 2001 From: memeriau Date: Mon, 21 Feb 2022 00:21:34 +0100 Subject: [PATCH] Some upgrades for teams choice --- src/components/Navigation/styles.module.scss | 20 +++++++++-- .../VolunteerBoard/TeamWishes/TeamWishes.tsx | 2 +- .../TeamWishesForm/TeamWishesForm.tsx | 33 +++++++------------ .../TeamWishesForm/styles.module.scss | 20 +++++------ src/theme/main.scss | 10 ++++++ src/theme/variables.scss | 1 + 6 files changed, 50 insertions(+), 36 deletions(-) diff --git a/src/components/Navigation/styles.module.scss b/src/components/Navigation/styles.module.scss index 25c8255..1c6a2ac 100644 --- a/src/components/Navigation/styles.module.scss +++ b/src/components/Navigation/styles.module.scss @@ -1,9 +1,23 @@ -@import "../../theme/mixins"; +@import "../../theme/variables"; .mainMenu { - @include nav-menu; + margin: 0; + padding: 0; + list-style: none; } .mainMenuItem { - @include nav-menu-item; + display: inline-block; + margin: 0 6px; + + a { + font-size: 0.9em; + font-weight: bold; + color: $color-black; + text-decoration: none; + } + + a:hover { + color: $color-grey-dark; + } } diff --git a/src/components/VolunteerBoard/TeamWishes/TeamWishes.tsx b/src/components/VolunteerBoard/TeamWishes/TeamWishes.tsx index b4c9956..c98c9f0 100644 --- a/src/components/VolunteerBoard/TeamWishes/TeamWishes.tsx +++ b/src/components/VolunteerBoard/TeamWishes/TeamWishes.tsx @@ -30,7 +30,7 @@ const TeamWishes: FC = (): JSX.Element | null => { return (
-
Mes choix d'équipes
+
Mon choix d'équipe
{teamWishesString && {teamWishesString}} {!teamWishesString && Non renseignés} {comment && ( diff --git a/src/components/VolunteerBoard/TeamWishesForm/TeamWishesForm.tsx b/src/components/VolunteerBoard/TeamWishesForm/TeamWishesForm.tsx index c028891..ab23b8c 100644 --- a/src/components/VolunteerBoard/TeamWishesForm/TeamWishesForm.tsx +++ b/src/components/VolunteerBoard/TeamWishesForm/TeamWishesForm.tsx @@ -1,4 +1,4 @@ -import { FC, memo, useCallback, useEffect, useRef, useState } from "react" +import { FC, memo, useCallback, useEffect, useRef } from "react" import { useSelector } from "react-redux" import get from "lodash/get" import set from "lodash/set" @@ -18,7 +18,6 @@ const TeamWishesForm: FC = ({ afterSubmit }): JSX.Element | null => { const { addToSelection, toggleToSelection, isInSelection } = useSelection() const commentRef = useRef(null) const [userWishes, saveWishes] = useUserTeamWishes() - const [extendedTeam, setExtendedTeam] = useState(null) useEffect(() => { if (!userWishes) return @@ -28,13 +27,6 @@ const TeamWishesForm: FC = ({ afterSubmit }): JSX.Element | null => { const onTeamClick = useCallback((id) => toggleToSelection(id), [toggleToSelection]) - const onExtendClick = useCallback( - (id) => setExtendedTeam(extendedTeam === id ? null : id), - [extendedTeam, setExtendedTeam] - ) - - console.log("extendedTeam", extendedTeam) - const onSubmit = useCallback(() => { const teamWishesComment = get(commentRef, "current.value", "") const teamWishes = teams @@ -47,8 +39,16 @@ const TeamWishesForm: FC = ({ afterSubmit }): JSX.Element | null => { return (
-
- Sélectionne la ou les équipes que tu aimerais rejoindre : +
Mon choix d'équipe
+
+

Sélectionne la ou les équipes que tu aimerais rejoindre.

+

+ Pour plus d'informations sur les équipes,{" "} + + clique ici + + . +

    {teams.map((team: any) => ( @@ -56,8 +56,7 @@ const TeamWishesForm: FC = ({ afterSubmit }): JSX.Element | null => { key={team.id} className={classnames( styles.teamLine, - isInSelection(team.id) && styles.active, - extendedTeam === team.id && styles.extended + isInSelection(team.id) && styles.active )} > - -
    {team.description}
    ))}
diff --git a/src/components/VolunteerBoard/TeamWishesForm/styles.module.scss b/src/components/VolunteerBoard/TeamWishesForm/styles.module.scss index 50f276a..879b757 100755 --- a/src/components/VolunteerBoard/TeamWishesForm/styles.module.scss +++ b/src/components/VolunteerBoard/TeamWishesForm/styles.module.scss @@ -11,6 +11,15 @@ text-align: center; } +.intro { + padding: 15px 0; + + p { + margin: 0; + padding: 4px 0; + } +} + .inputWrapper { margin: 10px 0; @@ -66,17 +75,6 @@ } } -.teamDescription { - display: none; - padding: 2px 4px 6px 8px; - color: $color-grey-dark; - font-size: 0.95em; - - .extended & { - display: block; - } -} - .commentWrapper { margin: 6px 0; diff --git a/src/theme/main.scss b/src/theme/main.scss index 884be4c..0754f19 100644 --- a/src/theme/main.scss +++ b/src/theme/main.scss @@ -8,3 +8,13 @@ body { font-family: "Helvetica-Light", Helvetica, Arial, sans-serif; background-color: $color-orange; } + +a { + color: $color-green; + text-decoration: none; + font-weight: bold; + + &:hover { + text-decoration: underline; + } +} diff --git a/src/theme/variables.scss b/src/theme/variables.scss index 1498743..ac7f576 100755 --- a/src/theme/variables.scss +++ b/src/theme/variables.scss @@ -7,6 +7,7 @@ $color-grey-dark: #555; $color-grey-medium: #999; $color-grey-light: #ccc; $color-grey-lighter: #eee; +$color-green: #080; $border-large: 4px solid $color-black; $border-thin: 2px solid $color-black;