Add global variables for meeting dates

This commit is contained in:
pikiou
2022-04-29 01:52:08 +02:00
parent 514cf1b833
commit 18c6f75511
16 changed files with 311 additions and 25 deletions

View File

@@ -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.
<br />
Pour rejoindre le serveur PeL, voici le lien d'invitation à cliquer :{" "}
<a href="https://discord.gg/eXhjKxSBB4" onClick={onSubmit}>
https://discord.gg/eXhjKxSBB4
<a href={discordInvitation} onClick={onSubmit}>
{discordInvitation}
</a>{" "}
!
</p>
@@ -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]