diff --git a/mon-entreprise/source/App.tsx b/mon-entreprise/source/App.tsx index 22bfaba66..b0a4a42b2 100644 --- a/mon-entreprise/source/App.tsx +++ b/mon-entreprise/source/App.tsx @@ -14,7 +14,7 @@ import { useContext, useMemo } from 'react' import { Helmet } from 'react-helmet' import { useTranslation } from 'react-i18next' import { useSelector } from 'react-redux' -import { Route, Switch } from 'react-router-dom' +import { Redirect, Route, Switch } from 'react-router-dom' import { configSituationSelector, situationSelector, @@ -85,6 +85,15 @@ const Router = () => { + {/* Removes trailing slashes */} + ( + + )} + /> diff --git a/publicodes/site/components/App.tsx b/publicodes/site/components/App.tsx index d97139643..3941d4500 100644 --- a/publicodes/site/components/App.tsx +++ b/publicodes/site/components/App.tsx @@ -1,7 +1,7 @@ import 'Components/ui/index.css' import { useEffect } from 'react' import { hot } from 'react-hot-loader' -import { Route, Switch } from 'react-router-dom' +import { Redirect, Route, Switch } from 'react-router-dom' import Communauté from '../pages/Communauté' import Documentation from '../pages/Documentation' import Landing from '../pages/Landing' @@ -34,6 +34,17 @@ const RouterSwitch = () => { > + {/* Removes trailing slashes */} + ( + + )} + />