diff --git a/src/components/Asks/AskDiscord.tsx b/src/components/Asks/AskDiscord.tsx index e8ea8b7..8d48e6d 100644 --- a/src/components/Asks/AskDiscord.tsx +++ b/src/components/Asks/AskDiscord.tsx @@ -8,10 +8,15 @@ import { fetchVolunteerDiscordIdIfNeed, selectVolunteerDiscordId, } from "../../store/volunteerDiscordId" +import { + fetchMiscDiscordInvitationIfNeed, + selectMiscDiscordInvitation, +} from "../../store/miscDiscordInvitation" export function AskDiscord(asks: JSX.Element[], id: number): void { const { dispatch, jwtToken, volunteerAsks } = useAskTools() const discordId: string | undefined = useSelector(selectVolunteerDiscordId) + const discordInvitation = useSelector(selectMiscDiscordInvitation) const onSubmit = useCallback((): void => { dispatch( @@ -38,8 +43,8 @@ export function AskDiscord(asks: JSX.Element[], id: number): void { totalement via la gestion des notifications.
Pour rejoindre le serveur PeL, voici le lien d'invitation à cliquer :{" "} - - https://discord.gg/eXhjKxSBB4 + + {discordInvitation} {" "} !

@@ -64,4 +69,4 @@ export function AskDiscord(asks: JSX.Element[], id: number): void { } // Fetch server-side data here -export const fetchFor = [fetchVolunteerDiscordIdIfNeed] +export const fetchFor = [fetchVolunteerDiscordIdIfNeed, fetchMiscDiscordInvitationIfNeed] diff --git a/src/components/RegisterForm/index.tsx b/src/components/RegisterForm/index.tsx index 0eaf8c1..d93899f 100644 --- a/src/components/RegisterForm/index.tsx +++ b/src/components/RegisterForm/index.tsx @@ -11,6 +11,10 @@ import { fetchVolunteerPartialAdd } from "../../store/volunteerPartialAdd" import FormButton from "../Form/FormButton/FormButton" import { validEmail } from "../../utils/standardization" import { toastError } from "../../store/utils" +import { + fetchMiscMeetingDateListIfNeed, + selectMiscMeetingDateList, +} from "../../store/miscMeetingDateList" interface Props { dispatch: AppDispatch @@ -43,6 +47,8 @@ const RegisterForm = ({ dispatch }: Props): JSX.Element => { const [sending, setSending] = useState(false) const [changingBackground, setChangingBackground] = useState(0) + const meetingDateList = useSelector(selectMiscMeetingDateList) + useEffect(() => { const timer = setInterval(() => { setChangingBackground((changingBackground + 1) % animations.length) @@ -456,6 +462,14 @@ const RegisterForm = ({ dispatch }: Props): JSX.Element => { > Street Food Market + , ou à une soirée festive à 2 pas du lieu du festival, aux{" "} + + apéros de la pétanque + .

@@ -469,13 +483,13 @@ const RegisterForm = ({ dispatch }: Props): JSX.Element => {
- {[ - { value: "13mai", desc: "Vendredi 13 mai" }, - { value: "24mai", desc: "Mardi 24 mai" }, - { value: "1juin", desc: "Mercredi 1er juin" }, - { value: "9juin", desc: "Jeudi 9 juin" }, - { value: "", desc: "Aucune date possible" }, - ].map((option) => ( + {_.concat( + meetingDateList.map((meetingDetails) => ({ + value: meetingDetails.meetingId, + desc: meetingDetails.meetingTitle, + })), + { value: "", desc: "Aucune date possible" } + ).map((option) => (