Add /simulateurs-et-assistants

pull/2529/head
Jérémy Rialland 2023-03-02 18:46:33 +01:00 committed by Johan Girod
parent a0a6ec58b8
commit 96a7fcf3fe
11 changed files with 23 additions and 13 deletions

View File

@ -34,6 +34,7 @@ import Simulateurs from '@/pages/Simulateurs'
import Stats from '@/pages/Stats/LazyStats'
import Assistants from '@/pages/assistants/index'
import Integration from '@/pages/integration/index'
import SimulateursEtAssistants from '@/pages/simulateurs-et-assistants'
import { useSitePaths } from '@/sitePaths'
import Provider, { ProviderProps } from './Provider'
@ -129,6 +130,10 @@ const App = () => {
path={relativeSitePaths.simulateurs.index + '/*'}
element={<Simulateurs />}
/>
<Route
path={relativeSitePaths.simulateursEtAssistants + '/*'}
element={<SimulateursEtAssistants />}
/>
<Route
path={relativeSitePaths.documentation.index + '/*'}
element={

View File

@ -15,7 +15,7 @@ import { useGetFullURL } from '@/hooks/useGetFullURL'
import useSimulatorsData from '@/hooks/useSimulatorsData'
import { useSitePaths } from '@/sitePaths'
import { SimulateurCard } from '../Simulateurs/Home'
import { SimulateurCard } from '../simulateurs-et-assistants'
import SearchOrCreate from './SearchOrCreate'
import illustration2Svg from './illustration2.svg'
import illustrationSvg from './illustration.svg'

View File

@ -1,6 +1,6 @@
import { useEffect, useMemo } from 'react'
import { Trans } from 'react-i18next'
import { Route, Routes, useLocation } from 'react-router-dom'
import { Navigate, Route, Routes, useLocation } from 'react-router-dom'
import { ScrollToTop } from '@/components/utils/Scroll'
import { usePersistingState } from '@/components/utils/persistState'
@ -10,7 +10,6 @@ import useSimulatorsData from '@/hooks/useSimulatorsData'
import { useSitePaths } from '@/sitePaths'
import SimulateurPage from '../../components/PageData'
import Home from './Home'
type State = {
fromGérer?: boolean
@ -79,7 +78,12 @@ export default function Simulateurs() {
)
) : null)}
<Routes>
<Route index element={<Home />} />
<Route
index
element={
<Navigate to={absoluteSitePaths.simulateursEtAssistants} replace />
}
/>
{simulatorRoutes}
</Routes>
</>

View File

@ -2,7 +2,7 @@ import { TrackPage } from '@/components/ATInternetTracking'
import { H2 } from '@/design-system/typography/heading'
import useSimulatorsData from '@/hooks/useSimulatorsData'
import { SimulateurCard } from '../Home'
import { SimulateurCard } from '../../simulateurs-et-assistants'
export default function SalariéSimulation() {
const simulators = useSimulatorsData()

View File

@ -20,7 +20,7 @@ import { useFetchData } from '@/hooks/useFetchData'
import useSimulatorsData, { SimulatorData } from '@/hooks/useSimulatorsData'
import { debounce, groupBy } from '@/utils'
import { SimulateurCard } from '../Simulateurs/Home'
import { SimulateurCard } from '../simulateurs-et-assistants'
import Chart, { Data, isDataStacked } from './Chart'
import DemandeUtilisateurs from './DemandesUtilisateurs'
import GlobalStats, { BigIndicator } from './GlobalStats'

View File

@ -11,11 +11,11 @@ import { Grid, Spacing } from '@/design-system/layout'
import { H2 } from '@/design-system/typography/heading'
import { Intro, SmallBody } from '@/design-system/typography/paragraphs'
import useSimulatorsData from '@/hooks/useSimulatorsData'
import { SimulateurCard } from '@/pages/simulateurs-et-assistants'
import { useSitePaths } from '@/sitePaths'
import { RootState } from '@/store/reducers/rootReducer'
import { useNextQuestionUrl } from '@/store/selectors/companyStatusSelectors'
import { SimulateurCard } from '../../../Simulateurs/Home'
import créerSvg from './créer.svg'
export default function ChoixStatutJuridique() {

View File

@ -28,11 +28,10 @@ export default function Gérer() {
<ScrollToTop key={location.pathname} />
<Routes>
{/* TODO Navigate to /simu-et-assist */}
<Route
index
element={
<Navigate to={absoluteSitePaths.simulateurs.index} replace />
<Navigate to={absoluteSitePaths.simulateursEtAssistants} replace />
}
/>
<Route

View File

@ -43,7 +43,7 @@ import { useQuestionList } from '@/hooks/useQuestionList'
import { useSetEntreprise } from '@/hooks/useSetEntreprise'
import useSimulationConfig from '@/hooks/useSimulationConfig'
import useSimulatorsData, { SimulatorData } from '@/hooks/useSimulatorsData'
import { SimulateurCard } from '@/pages/Simulateurs/Home'
import { SimulateurCard } from '@/pages/simulateurs-et-assistants'
import { useSitePaths } from '@/sitePaths'
import { resetCompany } from '@/store/actions/companyActions'
import { companySituationSelector } from '@/store/selectors/simulationSelectors'

View File

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

View File

@ -2,6 +2,7 @@ import { Trans, useTranslation } from 'react-i18next'
import { TrackPage } from '@/components/ATInternetTracking'
import PageHeader from '@/components/PageHeader'
import Meta from '@/components/utils/Meta'
import { Chip } from '@/design-system'
import InfoBulle from '@/design-system/InfoBulle'
import { Card } from '@/design-system/card'
@ -18,10 +19,9 @@ import { useIsEmbedded } from '@/hooks/useIsEmbedded'
import useSimulatorsData from '@/hooks/useSimulatorsData'
import { useSitePaths } from '@/sitePaths'
import Meta from '../../components/utils/Meta'
import simulatorSvg from './images/illustration-simulateur.svg'
import simulatorSvg from './illustration-simulateur.svg'
export default function Simulateurs() {
export default function SimulateursEtAssistants() {
const { t } = useTranslation()
const { absoluteSitePaths } = useSitePaths()
const simulators = useSimulatorsData()

View File

@ -91,6 +91,7 @@ const rawSitePathsFr = {
stats: 'statistiques',
accessibilité: 'accessibilité',
budget: 'budget',
simulateursEtAssistants: 'simulateurs-et-assistants',
développeur: {
index: 'développeur',
iframe: 'iframe',
@ -175,6 +176,7 @@ const rawSitePathsEn = {
nouveautés: 'news',
stats: 'statistics',
accessibilité: 'accessibility',
simulateursEtAssistants: 'simulators-and-assistants',
développeur: {
...rawSitePathsFr.développeur,
index: 'developer',