From 444582c5cc7a370f1c6b0995d39eb0bf8554994b Mon Sep 17 00:00:00 2001 From: memeriau Date: Sun, 30 Jan 2022 11:56:26 +0100 Subject: [PATCH] connect to store ParticipationDetailsForm --- src/components/VolunteerBoard/Board.tsx | 4 +- .../DDayInformations/DDaysInformations.tsx | 76 -------------- .../VolunteerBoard/DayWishes/DayWishes.tsx | 2 +- .../DayWishesForm/DayWishesForm.tsx | 2 +- .../ParticipationDetailsForm.tsx | 99 +++++++++++++++++++ .../styles.module.scss | 48 +++------ .../{days.utils.ts => daysWishes.utils.ts} | 4 +- .../participationDetails.utils.ts | 43 ++++++++ src/pages/Board/Board.tsx | 6 +- src/pages/DayWishes/DayWishes.tsx | 2 +- src/theme/form.scss | 5 +- 11 files changed, 173 insertions(+), 118 deletions(-) delete mode 100644 src/components/VolunteerBoard/DDayInformations/DDaysInformations.tsx create mode 100644 src/components/VolunteerBoard/ParticipationDetailsForm/ParticipationDetailsForm.tsx rename src/components/VolunteerBoard/{DDayInformations => ParticipationDetailsForm}/styles.module.scss (52%) rename src/components/VolunteerBoard/{days.utils.ts => daysWishes.utils.ts} (90%) create mode 100644 src/components/VolunteerBoard/participationDetails.utils.ts diff --git a/src/components/VolunteerBoard/Board.tsx b/src/components/VolunteerBoard/Board.tsx index 9f5251b..f92787b 100644 --- a/src/components/VolunteerBoard/Board.tsx +++ b/src/components/VolunteerBoard/Board.tsx @@ -1,14 +1,14 @@ import { FC, memo } from "react" import DayWishes from "./DayWishes/DayWishes" import DayWishesFormModal from "./DayWishesForm/DayWishesFormModal" -import DDayInformations from "./DDayInformations/DDaysInformations" +import ParticipationDetailsForm from "./ParticipationDetailsForm/ParticipationDetailsForm" import withUserConnected from "../../utils/withUserConnected" const Board: FC = (): JSX.Element => (
- +
) diff --git a/src/components/VolunteerBoard/DDayInformations/DDaysInformations.tsx b/src/components/VolunteerBoard/DDayInformations/DDaysInformations.tsx deleted file mode 100644 index 45ab31a..0000000 --- a/src/components/VolunteerBoard/DDayInformations/DDaysInformations.tsx +++ /dev/null @@ -1,76 +0,0 @@ -import { FC, memo, useCallback, useRef, useState } from "react" -import styles from "./styles.module.scss" - -const sizes = ["XS", "S", "M", "L", "XL", "XXL"] - -const DDayInformations: FC = (): JSX.Element | null => { - const sizeRef = useRef(null) - const dietRef = useRef(null) - const ageRef = useRef(null) - const commentRef = useRef(null) - const [has2Shirts, setHas2Shirts] = useState(null) - - const onSubmit = useCallback(() => { - console.log("on submit") - }, []) - - const onHas2ShirtsClick = useCallback( - (value) => { - setHas2Shirts(value) - }, - [setHas2Shirts] - ) - - return ( -
-
Informations pour le festival
-
-
J'ai déjà 2 t-shirts
- - - {has2Shirts === false && ( -
- - -
- )} -
-
- - -
-
- - -
-
- -