From 3264c866fe2752e2ed6cb045384d19e2ef2423ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Thu, 28 Sep 2023 17:17:12 +0200 Subject: [PATCH] Add BadNews message at top of the site --- site/source/components/App.tsx | 55 ++++++++++++++++++++++++++++++++-- 1 file changed, 52 insertions(+), 3 deletions(-) diff --git a/site/source/components/App.tsx b/site/source/components/App.tsx index 12af7f888..e0a02ea2e 100644 --- a/site/source/components/App.tsx +++ b/site/source/components/App.tsx @@ -1,7 +1,7 @@ import { ErrorBoundary } from '@sentry/react' import rules from 'modele-social' import { StrictMode, useMemo } from 'react' -import { useTranslation } from 'react-i18next' +import { Trans, useTranslation } from 'react-i18next' import { Route, Routes } from 'react-router-dom' import { css, styled } from 'styled-components' @@ -14,7 +14,11 @@ import { useEngine, useSetupSafeSituation, } from '@/components/utils/EngineContext' -import { Container } from '@/design-system/layout' +import { Message } from '@/design-system' +import { Emoji } from '@/design-system/emoji' +import { Container, Spacing } from '@/design-system/layout' +import { Link } from '@/design-system/typography/link' +import { Body } from '@/design-system/typography/paragraphs' import { useAxeCoreAnalysis } from '@/hooks/useAxeCoreAnalysis' import { useGetFullURL } from '@/hooks/useGetFullURL' import { useIsEmbedded } from '@/hooks/useIsEmbedded' @@ -65,6 +69,7 @@ export default function Root({ + @@ -74,6 +79,41 @@ export default function Root({ ) } +const BadNews = () => { + const { t } = useTranslation() + const { absoluteSitePaths } = useSitePaths() + + return ( + + ) +} + const Router = () => { const engine = useEngine() @@ -81,7 +121,16 @@ const Router = () => { return ( - } /> + + {/* Spacing added for BadNews */} + + + + } + /> } /> )