From ab5bd85ec3826f6ab1b9fe76ec9f38446f70ecbe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Rialland?= Date: Mon, 27 Feb 2023 16:16:35 +0100 Subject: [PATCH] Replace /stats by /statistiques --- site/source/App.tsx | 17 +++++++++++++++-- .../components/Comparateur.tsx | 2 +- site/source/sitePaths.ts | 3 ++- 3 files changed, 18 insertions(+), 4 deletions(-) diff --git a/site/source/App.tsx b/site/source/App.tsx index d6206d6a5..07e4cc7e5 100644 --- a/site/source/App.tsx +++ b/site/source/App.tsx @@ -3,7 +3,7 @@ import { FallbackRender } from '@sentry/react/types/errorboundary' import rules from 'modele-social' import { ComponentProps, useMemo } from 'react' import { useTranslation } from 'react-i18next' -import { Route, Routes } from 'react-router-dom' +import { Navigate, Route, Routes, redirect } from 'react-router-dom' import styled, { css } from 'styled-components' import Route404 from '@/components/Route404' @@ -82,11 +82,24 @@ const Router = () => { return ( } /> + } /> } /> ) } +const Redirections = () => { + const { relativeSitePaths } = useSitePaths() + + return ( + <> + } + /> + + ) +} const CatchOffline = ({ error }: ComponentProps) => { if (error.message.includes('dynamically imported module')) { @@ -156,7 +169,7 @@ const App = () => { path={relativeSitePaths.nouveautés + '/*'} element={} /> - } /> + } /> } />