diff --git a/web/components/FooterMenu.tsx b/web/components/FooterMenu.tsx index 0af9eeab..f3d9181d 100644 --- a/web/components/FooterMenu.tsx +++ b/web/components/FooterMenu.tsx @@ -14,6 +14,7 @@ import { Box, Flex, Text, Link as ChakraLink, Divider } from '@chakra-ui/react' import { useTranslation } from 'next-i18next' import SigninModal from '~components/Signin/SigninModal' import { useSession } from 'next-auth/client' +import useCampaignContext from '~components/Campaign/useCampaignContext' const MenuItem = ({ href, text }) => { return ( @@ -26,6 +27,7 @@ const MenuItem = ({ href, text }) => { const FooterMenu = () => { const [session, loading] = useSession() const { t } = useTranslation() + const { currentCampaign } = useCampaignContext() return ( @@ -54,6 +56,12 @@ const FooterMenu = () => { + {currentCampaign && currentCampaign?.chart_url && ( + + )} ) diff --git a/web/components/MobileMenu.tsx b/web/components/MobileMenu.tsx index 1593932a..d4e38fdc 100644 --- a/web/components/MobileMenu.tsx +++ b/web/components/MobileMenu.tsx @@ -114,7 +114,9 @@ const MobileMenu = ({ colorMode }: Props) => { /> ) : ( @@ -122,6 +124,12 @@ const MobileMenu = ({ colorMode }: Props) => { )} + {currentCampaign && currentCampaign?.article_link && ( + + )} diff --git a/web/components/Navigation/Header.tsx b/web/components/Navigation/Header.tsx index fadfdbbb..cb32213e 100644 --- a/web/components/Navigation/Header.tsx +++ b/web/components/Navigation/Header.tsx @@ -89,7 +89,9 @@ const Header = ({ colorMode }: Props) => { {t('nav.places_regular')} - {t('nav.places_emergence')} + {t('nav.places_emergence', { + title: currentCampaign?.title, + })} @@ -108,6 +110,12 @@ const Header = ({ colorMode }: Props) => { }} /> + {currentCampaign && currentCampaign?.article_link && ( + + )} diff --git a/web/public/locales/fr/common.json b/web/public/locales/fr/common.json index e8c1a4ca..88642f47 100644 --- a/web/public/locales/fr/common.json +++ b/web/public/locales/fr/common.json @@ -21,8 +21,10 @@ "signin": "Connexion", "cgu": "Conditions générales d'utilisation", "policy": "Chartes StudioD", - "places_emergence": "Dispositif émergence", - "places_regular": "Créneaux solidaires" + "places_emergence": "Créneaux {{title}}", + "places_regular": "Créneaux solidaires", + "campaign": "Dispositif {{title}}", + "campaign_chart": "Charte StudioD – {{title}}" }, "error": "Une erreur est survenue", "success": "Enregistrement réussi",