diff --git a/site/source/components/layout/Footer/Footer.tsx b/site/source/components/layout/Footer/Footer.tsx
index 1cef17c46..9350c2b13 100644
--- a/site/source/components/layout/Footer/Footer.tsx
+++ b/site/source/components/layout/Footer/Footer.tsx
@@ -1,17 +1,17 @@
-import PageFeedback from 'Components/Feedback'
-import LegalNotice from 'Components/LegalNotice'
-import Emoji from 'Components/utils/Emoji'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { FooterContainer } from 'DesignSystem/footer'
-import { FooterColumn } from 'DesignSystem/footer/column'
-import { Container } from 'DesignSystem/layout'
-import { Link } from 'DesignSystem/typography/link'
-import { Body } from 'DesignSystem/typography/paragraphs'
+import PageFeedback from '@/components/Feedback'
+import LegalNotice from '@/components/LegalNotice'
+import Emoji from '@/components/utils/Emoji'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { FooterContainer } from '@/design-system/footer'
+import { FooterColumn } from '@/design-system/footer/column'
+import { Container } from '@/design-system/layout'
+import { Link } from '@/design-system/typography/link'
+import { Body } from '@/design-system/typography/paragraphs'
import { useContext } from 'react'
import { Helmet } from 'react-helmet-async'
import { Trans, useTranslation } from 'react-i18next'
import { ThemeProvider } from 'styled-components'
-import { hrefLangLink } from '../../../sitePaths'
+import { hrefLangLink } from '@/sitePaths'
import InscriptionBetaTesteur from './InscriptionBetaTesteur'
import Privacy from './Privacy'
import { useShowFeedback } from './useShowFeedback'
diff --git a/site/source/components/layout/Footer/InscriptionBetaTesteur/index.tsx b/site/source/components/layout/Footer/InscriptionBetaTesteur/index.tsx
index ea55fc8c3..b06de7cdf 100644
--- a/site/source/components/layout/Footer/InscriptionBetaTesteur/index.tsx
+++ b/site/source/components/layout/Footer/InscriptionBetaTesteur/index.tsx
@@ -1,8 +1,8 @@
-import { Button } from 'DesignSystem/buttons'
-import { Spacing } from 'DesignSystem/layout'
-import PopoverWithTrigger from 'DesignSystem/PopoverWithTrigger'
-import { Link } from 'DesignSystem/typography/link'
-import { Body, Intro } from 'DesignSystem/typography/paragraphs'
+import { Button } from '@/design-system/buttons'
+import { Spacing } from '@/design-system/layout'
+import PopoverWithTrigger from '@/design-system/PopoverWithTrigger'
+import { Link } from '@/design-system/typography/link'
+import { Body, Intro } from '@/design-system/typography/paragraphs'
import FeedbackSvg from './feedback.svg'
export const INSCRIPTION_LINK =
diff --git a/site/source/components/layout/Footer/Privacy.tsx b/site/source/components/layout/Footer/Privacy.tsx
index 85d4cbe53..26e64ee9a 100644
--- a/site/source/components/layout/Footer/Privacy.tsx
+++ b/site/source/components/layout/Footer/Privacy.tsx
@@ -1,7 +1,7 @@
-import { Checkbox } from 'DesignSystem/field'
-import PopoverWithTrigger from 'DesignSystem/PopoverWithTrigger'
-import { Link } from 'DesignSystem/typography/link'
-import { Body, SmallBody } from 'DesignSystem/typography/paragraphs'
+import { Checkbox } from '@/design-system/field'
+import PopoverWithTrigger from '@/design-system/PopoverWithTrigger'
+import { Link } from '@/design-system/typography/link'
+import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import { useCallback, useContext, useState } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { TrackingContext, TrackPage } from '../../../ATInternetTracking'
diff --git a/site/source/components/layout/Footer/useShowFeedback.ts b/site/source/components/layout/Footer/useShowFeedback.ts
index 558cb255f..6368ba91d 100644
--- a/site/source/components/layout/Footer/useShowFeedback.ts
+++ b/site/source/components/layout/Footer/useShowFeedback.ts
@@ -1,7 +1,7 @@
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
import { useContext } from 'react'
import { useLocation } from 'react-router-dom'
-import useSimulatorsData from '../../../pages/Simulateurs/metadata'
+import useSimulatorsData from '@/pages/Simulateurs/metadata'
export const useShowFeedback = () => {
const currentPath = useLocation().pathname
diff --git a/site/source/components/layout/Header.tsx b/site/source/components/layout/Header.tsx
index 19c69e60d..166d8bb27 100644
--- a/site/source/components/layout/Header.tsx
+++ b/site/source/components/layout/Header.tsx
@@ -1,9 +1,9 @@
-import { Logo } from 'Components/Logo'
-import SearchButton from 'Components/SearchButton'
-import BrowserOnly from 'Components/utils/BrowserOnly'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Container } from 'DesignSystem/layout'
-import { Link } from 'DesignSystem/typography/link'
+import { Logo } from '@/components/Logo'
+import SearchButton from '@/components/SearchButton'
+import BrowserOnly from '@/components/utils/BrowserOnly'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Container } from '@/design-system/layout'
+import { Link } from '@/design-system/typography/link'
import { useContext } from 'react'
import { useTranslation } from 'react-i18next'
import styled from 'styled-components'
diff --git a/site/source/components/layout/NewsBanner.tsx b/site/source/components/layout/NewsBanner.tsx
index a9b5c544d..907480fa0 100644
--- a/site/source/components/layout/NewsBanner.tsx
+++ b/site/source/components/layout/NewsBanner.tsx
@@ -1,9 +1,9 @@
-import { Appear } from 'Components/ui/animate'
-import Emoji from 'Components/utils/Emoji'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import lastRelease from 'Data/last-release.json'
-import { Banner, HideButton, InnerBanner } from 'DesignSystem/banner'
-import { Link } from 'DesignSystem/typography/link'
+import { Appear } from '@/components/ui/animate'
+import Emoji from '@/components/utils/Emoji'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import lastRelease from '@/data/last-release.json'
+import { Banner, HideButton, InnerBanner } from '@/design-system/banner'
+import { Link } from '@/design-system/typography/link'
import { useContext, useEffect, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { getItem, setItem } from '../../storage/safeLocalStorage'
diff --git a/site/source/components/search/RulesInfiniteHits/index.tsx b/site/source/components/search/RulesInfiniteHits/index.tsx
index 805bad747..bcc0436a2 100644
--- a/site/source/components/search/RulesInfiniteHits/index.tsx
+++ b/site/source/components/search/RulesInfiniteHits/index.tsx
@@ -1,16 +1,16 @@
-import { Button } from 'DesignSystem/buttons'
-import { FocusStyle } from 'DesignSystem/global-style'
-import { H3 } from 'DesignSystem/typography/heading'
-import { Body, SmallBody } from 'DesignSystem/typography/paragraphs'
+import { Button } from '@/design-system/buttons'
+import { FocusStyle } from '@/design-system/global-style'
+import { H3 } from '@/design-system/typography/heading'
+import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import { Trans, useTranslation } from 'react-i18next'
import { Hit as AlgoliaHit } from 'react-instantsearch-core'
import { connectInfiniteHits, connectStats } from 'react-instantsearch-dom'
import styled from 'styled-components'
-import { Names } from '../../../../../modele-social/dist/names'
+import { DottedName } from 'modele-social'
import RuleLink from '../../RuleLink'
import { Highlight } from '../Hightlight'
-type Hit = AlgoliaHit<{ objectID: Names; namespace?: string }>
+type Hit = AlgoliaHit<{ objectID: DottedName; namespace?: string }>
const StyledRuleLink = styled(RuleLink)`
${SmallBody}, ${Body} {
diff --git a/site/source/components/search/SearchBox.tsx b/site/source/components/search/SearchBox.tsx
index 280bae3f9..c87e51418 100644
--- a/site/source/components/search/SearchBox.tsx
+++ b/site/source/components/search/SearchBox.tsx
@@ -1,4 +1,4 @@
-import { SearchField } from 'DesignSystem/field'
+import { SearchField } from '@/design-system/field'
import { useTranslation } from 'react-i18next'
import { connectSearchBox } from 'react-instantsearch-dom'
diff --git a/site/source/components/search/SearchRules.tsx b/site/source/components/search/SearchRules.tsx
index 5e9430593..10bc868b3 100644
--- a/site/source/components/search/SearchRules.tsx
+++ b/site/source/components/search/SearchRules.tsx
@@ -1,5 +1,5 @@
import algoliasearch from 'algoliasearch/lite'
-import { H2 } from 'DesignSystem/typography/heading'
+import { H2 } from '@/design-system/typography/heading'
import { Trans } from 'react-i18next'
import { RulesInfiniteHits } from './RulesInfiniteHits'
import { SearchBox } from './SearchBox'
diff --git a/site/source/components/search/SearchRulesAndSimulators.tsx b/site/source/components/search/SearchRulesAndSimulators.tsx
index a65f1e2eb..bd627b82d 100644
--- a/site/source/components/search/SearchRulesAndSimulators.tsx
+++ b/site/source/components/search/SearchRulesAndSimulators.tsx
@@ -1,5 +1,5 @@
import algoliasearch from 'algoliasearch/lite'
-import { Spacing } from 'DesignSystem/layout'
+import { Spacing } from '@/design-system/layout'
import { useEffect } from 'react'
import { Configure, Index } from 'react-instantsearch-dom'
import { useHistory } from 'react-router'
diff --git a/site/source/components/search/SimulatorHits.tsx b/site/source/components/search/SimulatorHits.tsx
index 4afba236d..b87df7ac9 100644
--- a/site/source/components/search/SimulatorHits.tsx
+++ b/site/source/components/search/SimulatorHits.tsx
@@ -1,11 +1,11 @@
import { Grid } from '@mui/material'
-import Emoji from 'Components/utils/Emoji'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { SmallCard } from 'DesignSystem/card'
-import InfoBulle from 'DesignSystem/InfoBulle'
-import { H3 } from 'DesignSystem/typography/heading'
-import { ExtractFromSimuData } from 'pages/Simulateurs/metadata'
-import { MetadataSrc } from 'pages/Simulateurs/metadata-src'
+import Emoji from '@/components/utils/Emoji'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { SmallCard } from '@/design-system/card'
+import InfoBulle from '@/design-system/InfoBulle'
+import { H3 } from '@/design-system/typography/heading'
+import { ExtractFromSimuData } from '@/pages/Simulateurs/metadata'
+import { MetadataSrc } from '@/pages/Simulateurs/metadata-src'
import { path } from 'ramda'
import { useContext } from 'react'
import { Trans } from 'react-i18next'
diff --git a/site/source/components/simulationExplanation/ExportRecover.tsx b/site/source/components/simulationExplanation/ExportRecover.tsx
index 0cb88e7ae..8a1abe460 100644
--- a/site/source/components/simulationExplanation/ExportRecover.tsx
+++ b/site/source/components/simulationExplanation/ExportRecover.tsx
@@ -1,5 +1,5 @@
-import { useUrl } from 'Components/ShareSimulationBanner'
-import { SmallBody } from 'DesignSystem/typography/paragraphs'
+import { useUrl } from '@/components/ShareSimulationBanner'
+import { SmallBody } from '@/design-system/typography/paragraphs'
import { Trans } from 'react-i18next'
export default function ExportRecover() {
diff --git a/site/source/components/simulationExplanation/IndépendantCotisationsForfaitaires.tsx b/site/source/components/simulationExplanation/IndépendantCotisationsForfaitaires.tsx
index d344ec998..7ad1d27a4 100644
--- a/site/source/components/simulationExplanation/IndépendantCotisationsForfaitaires.tsx
+++ b/site/source/components/simulationExplanation/IndépendantCotisationsForfaitaires.tsx
@@ -1,11 +1,11 @@
-import Value from 'Components/EngineValue'
-import { FromBottom } from 'Components/ui/animate'
-import { useEngine } from 'Components/utils/EngineContext'
-import { Markdown } from 'Components/utils/markdown'
-import { Button } from 'DesignSystem/buttons'
-import { Spacing } from 'DesignSystem/layout'
-import { H3 } from 'DesignSystem/typography/heading'
-import { Intro } from 'DesignSystem/typography/paragraphs'
+import Value from '@/components/EngineValue'
+import { FromBottom } from '@/components/ui/animate'
+import { useEngine } from '@/components/utils/EngineContext'
+import { Markdown } from '@/components/utils/markdown'
+import { Button } from '@/design-system/buttons'
+import { Spacing } from '@/design-system/layout'
+import { H3 } from '@/design-system/typography/heading'
+import { Intro } from '@/design-system/typography/paragraphs'
import { Trans } from 'react-i18next'
export default function CotisationsForfaitaires() {
diff --git a/site/source/components/simulationExplanation/IndépendantCotisationsRégularisation.tsx b/site/source/components/simulationExplanation/IndépendantCotisationsRégularisation.tsx
index e83a9a9df..dc84786d8 100644
--- a/site/source/components/simulationExplanation/IndépendantCotisationsRégularisation.tsx
+++ b/site/source/components/simulationExplanation/IndépendantCotisationsRégularisation.tsx
@@ -1,9 +1,9 @@
-import { FromBottom } from 'Components/ui/animate'
-import { useEngine } from 'Components/utils/EngineContext'
-import { Markdown } from 'Components/utils/markdown'
-import { Button } from 'DesignSystem/buttons'
-import { Spacing } from 'DesignSystem/layout'
-import { H3 } from 'DesignSystem/typography/heading'
+import { FromBottom } from '@/components/ui/animate'
+import { useEngine } from '@/components/utils/EngineContext'
+import { Markdown } from '@/components/utils/markdown'
+import { Button } from '@/design-system/buttons'
+import { Spacing } from '@/design-system/layout'
+import { H3 } from '@/design-system/typography/heading'
import { Trans } from 'react-i18next'
export default function CotisationsRégularisation() {
diff --git a/site/source/components/simulationExplanation/IndépendantExplanation.tsx b/site/source/components/simulationExplanation/IndépendantExplanation.tsx
index 21304b606..bd9981c91 100644
--- a/site/source/components/simulationExplanation/IndépendantExplanation.tsx
+++ b/site/source/components/simulationExplanation/IndépendantExplanation.tsx
@@ -1,23 +1,23 @@
-import BarChartBranch from 'Components/BarChart'
-import 'Components/Distribution.css'
+import BarChartBranch from '@/components/BarChart'
+import '@/components/Distribution.css'
import Value, {
Condition,
WhenApplicable,
WhenNotApplicable,
-} from 'Components/EngineValue'
-import RuleLink from 'Components/RuleLink'
-import StackedBarChart from 'Components/StackedBarChart'
-import { useEngine } from 'Components/utils/EngineContext'
-import { Strong } from 'DesignSystem/typography'
-import { H3 } from 'DesignSystem/typography/heading'
-import { Li, Ul } from 'DesignSystem/typography/list'
-import { SmallBody } from 'DesignSystem/typography/paragraphs'
+} from '@/components/EngineValue'
+import RuleLink from '@/components/RuleLink'
+import StackedBarChart from '@/components/StackedBarChart'
+import { useEngine } from '@/components/utils/EngineContext'
+import { Strong } from '@/design-system/typography'
+import { H3 } from '@/design-system/typography/heading'
+import { Li, Ul } from '@/design-system/typography/list'
+import { SmallBody } from '@/design-system/typography/paragraphs'
import { DottedName } from 'modele-social'
import { max } from 'ramda'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { targetUnitSelector } from 'Selectors/simulationSelectors'
+import { targetUnitSelector } from '@/selectors/simulationSelectors'
import { ThemeContext } from 'styled-components'
import CotisationsForfaitaires from './IndépendantCotisationsForfaitaires'
import CotisationsRégularisation from './IndépendantCotisationsRégularisation'
diff --git a/site/source/components/simulationExplanation/InstitutionsPartenaires.tsx b/site/source/components/simulationExplanation/InstitutionsPartenaires.tsx
index ffe327ddd..64257529d 100644
--- a/site/source/components/simulationExplanation/InstitutionsPartenaires.tsx
+++ b/site/source/components/simulationExplanation/InstitutionsPartenaires.tsx
@@ -3,21 +3,21 @@ import Value, {
Condition,
WhenApplicable,
WhenNotApplicable,
-} from 'Components/EngineValue'
-import RuleLink from 'Components/RuleLink'
-import { FromBottom } from 'Components/ui/animate'
-import Emoji from 'Components/utils/Emoji'
-import { useEngine } from 'Components/utils/EngineContext'
-import { H2, H3 } from 'DesignSystem/typography/heading'
-import { Body, SmallBody } from 'DesignSystem/typography/paragraphs'
-import assuranceMaladieSrc from 'Images/assurance-maladie.svg'
-import dgfipSrc from 'Images/logo-dgfip.svg'
-import * as logosSrc from 'Images/logos-caisses-retraite'
-import urssafSrc from 'Images/Urssaf.svg'
+} from '@/components/EngineValue'
+import RuleLink from '@/components/RuleLink'
+import { FromBottom } from '@/components/ui/animate'
+import Emoji from '@/components/utils/Emoji'
+import { useEngine } from '@/components/utils/EngineContext'
+import { H2, H3 } from '@/design-system/typography/heading'
+import { Body, SmallBody } from '@/design-system/typography/paragraphs'
+import assuranceMaladieSrc from '@/images/assurance-maladie.svg'
+import dgfipSrc from '@/images/logo-dgfip.svg'
+import * as logosSrc from '@/images/logos-caisses-retraite'
+import urssafSrc from '@/images/Urssaf.svg'
import { DottedName } from 'modele-social'
import { Trans } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { targetUnitSelector } from 'Selectors/simulationSelectors'
+import { targetUnitSelector } from '@/selectors/simulationSelectors'
import styled from 'styled-components'
export default function InstitutionsPartenaires() {
diff --git a/site/source/components/simulationExplanation/SalaryExplanation.tsx b/site/source/components/simulationExplanation/SalaryExplanation.tsx
index 6b4a9074b..fc282b4b3 100644
--- a/site/source/components/simulationExplanation/SalaryExplanation.tsx
+++ b/site/source/components/simulationExplanation/SalaryExplanation.tsx
@@ -1,14 +1,14 @@
import { Grid } from '@mui/material'
-import Distribution from 'Components/Distribution'
-import PaySlip from 'Components/PaySlip'
-import StackedBarChart from 'Components/StackedBarChart'
-import { FromTop } from 'Components/ui/animate'
-import Emoji from 'Components/utils/Emoji'
-import { useInversionFail } from 'Components/utils/EngineContext'
-import { Container, Spacing } from 'DesignSystem/layout'
-import { H2 } from 'DesignSystem/typography/heading'
-import { Link } from 'DesignSystem/typography/link'
-import { SmallBody } from 'DesignSystem/typography/paragraphs'
+import Distribution from '@/components/Distribution'
+import PaySlip from '@/components/PaySlip'
+import StackedBarChart from '@/components/StackedBarChart'
+import { FromTop } from '@/components/ui/animate'
+import Emoji from '@/components/utils/Emoji'
+import { useInversionFail } from '@/components/utils/EngineContext'
+import { Container, Spacing } from '@/design-system/layout'
+import { H2 } from '@/design-system/typography/heading'
+import { Link } from '@/design-system/typography/link'
+import { SmallBody } from '@/design-system/typography/paragraphs'
import { useContext, useRef } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { ThemeContext } from 'styled-components'
diff --git a/site/source/components/ui/AnimatedTargetValue.tsx b/site/source/components/ui/AnimatedTargetValue.tsx
index 28698dce6..87d7ff251 100644
--- a/site/source/components/ui/AnimatedTargetValue.tsx
+++ b/site/source/components/ui/AnimatedTargetValue.tsx
@@ -2,7 +2,7 @@ import { formatValue } from 'publicodes'
import React, { useRef } from 'react'
import { useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { targetUnitSelector } from 'Selectors/simulationSelectors'
+import { targetUnitSelector } from '@/selectors/simulationSelectors'
import styled, { keyframes } from 'styled-components'
type AnimatedTargetValueProps = {
diff --git a/site/source/components/ui/Checklist/index.tsx b/site/source/components/ui/Checklist/index.tsx
index f84f79ce3..00a9bd66b 100644
--- a/site/source/components/ui/Checklist/index.tsx
+++ b/site/source/components/ui/Checklist/index.tsx
@@ -1,9 +1,9 @@
import { Grid } from '@mui/material'
-import { Markdown } from 'Components/utils/markdown'
-import { ScrollToElement } from 'Components/utils/Scroll'
-import { Checkbox } from 'DesignSystem/field'
-import { Spacing } from 'DesignSystem/layout'
-import { Link } from 'DesignSystem/typography/link'
+import { Markdown } from '@/components/utils/markdown'
+import { ScrollToElement } from '@/components/utils/Scroll'
+import { Checkbox } from '@/design-system/field'
+import { Spacing } from '@/design-system/layout'
+import { Link } from '@/design-system/typography/link'
import React, { useEffect, useState } from 'react'
import { Trans } from 'react-i18next'
import styled from 'styled-components'
diff --git a/site/source/components/ui/WarningBlock.tsx b/site/source/components/ui/WarningBlock.tsx
index 4539fbc2c..c86f8edec 100644
--- a/site/source/components/ui/WarningBlock.tsx
+++ b/site/source/components/ui/WarningBlock.tsx
@@ -1,9 +1,9 @@
-import Emoji from 'Components/utils/Emoji'
-import { usePersistingState } from 'Components/utils/persistState'
-import { Button } from 'DesignSystem/buttons'
-import { Spacing } from 'DesignSystem/layout'
-import { Link } from 'DesignSystem/typography/link'
-import { Intro } from 'DesignSystem/typography/paragraphs'
+import Emoji from '@/components/utils/Emoji'
+import { usePersistingState } from '@/components/utils/persistState'
+import { Button } from '@/design-system/buttons'
+import { Spacing } from '@/design-system/layout'
+import { Link } from '@/design-system/typography/link'
+import { Intro } from '@/design-system/typography/paragraphs'
import { ReactNode } from 'react'
import { Trans } from 'react-i18next'
import styled from 'styled-components'
@@ -22,7 +22,8 @@ const WarningSection = styled.section`
`
export default function Warning({ localStorageKey, children }: WarningProps) {
- const [folded, fold] = usePersistingState(localStorageKey, false)
+ const [folded, fold] = usePersistingState(localStorageKey, false)
+
return (
<>
diff --git a/site/source/components/ui/animate.tsx b/site/source/components/ui/animate.tsx
index 464e5ea94..9b188bb99 100644
--- a/site/source/components/ui/animate.tsx
+++ b/site/source/components/ui/animate.tsx
@@ -1,4 +1,4 @@
-import { DisableAnimationContext } from 'Components/utils/DisableAnimationContext'
+import { DisableAnimationContext } from '@/components/utils/DisableAnimationContext'
import React, { useContext } from 'react'
import {
animated,
@@ -40,7 +40,6 @@ export function FromBottom({
<>
{trail.map((style, i) => (
{
+type Storage = Record | boolean | number | null
+
+export const getInitialState = (key: string): T | null => {
const value = safeLocalStorage.getItem(key)
if (value === 'undefined' || !value) {
- return
+ return null
}
try {
- return JSON.parse(value)
+ return JSON.parse(value) as T
} catch (e) {
// eslint-disable-next-line no-console
console.warn(e)
@@ -15,7 +17,10 @@ export const getInitialState = (key: string) => {
}
}
-export const useSafeLocaleStorage = (key: string, state: any) => {
+export const useSafeLocaleStorage = (
+ key: string,
+ state: T
+) => {
useEffect(() => {
if (key) {
safeLocalStorage.setItem(key, JSON.stringify(state))
@@ -23,10 +28,13 @@ export const useSafeLocaleStorage = (key: string, state: any) => {
}, [key, state])
}
-export const usePersistingState = (key: string, defaultState?: any) => {
- const persistedState = getInitialState(key)
+export const usePersistingState = (
+ key: string,
+ defaultState: T
+) => {
+ const persistedState = getInitialState(key)
const initialState = persistedState != null ? persistedState : defaultState
- const [state, setState] = useState(initialState)
+ const [state, setState] = useState(initialState)
useSafeLocaleStorage(key, state)
return [state, setState] as const
}
diff --git a/site/source/components/utils/useNextQuestion.tsx b/site/source/components/utils/useNextQuestion.tsx
index 1c8cef663..0f19b7e42 100644
--- a/site/source/components/utils/useNextQuestion.tsx
+++ b/site/source/components/utils/useNextQuestion.tsx
@@ -24,14 +24,14 @@ import {
} from 'ramda'
import { useContext, useMemo } from 'react'
import { useSelector } from 'react-redux'
-import { Simulation, SimulationConfig } from 'Reducers/rootReducer'
+import { Simulation, SimulationConfig } from '@/reducers/rootReducer'
import {
answeredQuestionsSelector,
configSelector,
currentQuestionSelector,
objectifsSelector,
situationSelector,
-} from 'Selectors/simulationSelectors'
+} from '@/selectors/simulationSelectors'
import { EngineContext } from './EngineContext'
type MissingVariables = Partial>
diff --git a/site/source/components/utils/useSearchParamsSimulationSharing.ts b/site/source/components/utils/useSearchParamsSimulationSharing.ts
index b316afd4f..181988349 100644
--- a/site/source/components/utils/useSearchParamsSimulationSharing.ts
+++ b/site/source/components/utils/useSearchParamsSimulationSharing.ts
@@ -1,14 +1,13 @@
import { useEffect, useMemo, useState } from 'react'
import { useSelector, useDispatch } from 'react-redux'
-import { RootState, SimulationConfig, Situation } from 'Reducers/rootReducer'
+import { RootState, SimulationConfig, Situation } from '@/reducers/rootReducer'
import { useHistory } from 'react-router'
-import { useSearchParams } from 'Components/utils/useSearchParams'
-import { useEngine } from 'Components/utils/EngineContext'
-import { configSelector } from 'Selectors/simulationSelectors'
+import { useSearchParams } from '@/components/utils/useSearchParams'
+import { useEngine } from '@/components/utils/EngineContext'
+import { configSelector } from '@/selectors/simulationSelectors'
import Engine, { ParsedRules, serializeEvaluation } from 'publicodes'
import { DottedName } from 'modele-social'
-import { updateSituation, setActiveTarget } from 'Actions/actions'
-import { Names } from 'modele-social/dist/names'
+import { updateSituation, setActiveTarget } from '@/actions/actions'
type Objectifs = (string | { objectifs: string[] })[]
type ShortName = string
@@ -149,7 +148,7 @@ export function getSituationFromSearchParams(
searchParams: URLSearchParams,
dottedNameParamName: [DottedName, ParamName][]
) {
- const situation: { [key in Names]?: string } = {}
+ const situation: { [key in DottedName]?: string } = {}
const paramNameDottedName = dottedNameParamName.reduce(
(dottedNameBySearchParamName, [dottedName, paramName]) => ({
diff --git a/site/source/components/utils/useSimulationConfig.ts b/site/source/components/utils/useSimulationConfig.ts
index 51874f97b..4a48e58d2 100644
--- a/site/source/components/utils/useSimulationConfig.ts
+++ b/site/source/components/utils/useSimulationConfig.ts
@@ -1,10 +1,10 @@
-import { setSimulationConfig } from 'Actions/actions'
+import { setSimulationConfig } from '@/actions/actions'
import { useEffect } from 'react'
import { useDispatch, useSelector } from 'react-redux'
import { useHistory } from 'react-router'
-import { Company } from 'Reducers/inFranceAppReducer'
-import { RootState, SimulationConfig, Situation } from 'Reducers/rootReducer'
-import { configSelector } from 'Selectors/simulationSelectors'
+import { Company } from '@/reducers/inFranceAppReducer'
+import { RootState, SimulationConfig, Situation } from '@/reducers/rootReducer'
+import { configSelector } from '@/selectors/simulationSelectors'
export default function useSimulationConfig(
config: SimulationConfig | undefined,
diff --git a/site/source/design-system/PopoverWithTrigger.tsx b/site/source/design-system/PopoverWithTrigger.tsx
index e33fb21e9..f7951be25 100644
--- a/site/source/design-system/PopoverWithTrigger.tsx
+++ b/site/source/design-system/PopoverWithTrigger.tsx
@@ -1,7 +1,7 @@
import { useOverlayTrigger } from '@react-aria/overlays'
import { useOverlayTriggerState } from '@react-stately/overlays'
import { AriaButtonProps } from '@react-types/button'
-import { Button } from 'DesignSystem/buttons'
+import { Button } from '@/design-system/buttons'
import React, { ReactElement, Ref, useEffect, useMemo, useRef } from 'react'
import { useLocation } from 'react-router'
import Popover from './Popover'
diff --git a/site/source/design-system/banner/index.ts b/site/source/design-system/banner/index.ts
index d1dddf7e9..ec41ad8f9 100644
--- a/site/source/design-system/banner/index.ts
+++ b/site/source/design-system/banner/index.ts
@@ -1,5 +1,5 @@
-import { Button } from 'DesignSystem/buttons'
-import { GenericButtonOrLinkProps } from 'DesignSystem/typography/link'
+import { Button } from '@/design-system/buttons'
+import { GenericButtonOrLinkProps } from '@/design-system/typography/link'
import styled from 'styled-components'
export const Banner = styled.div`
diff --git a/site/source/design-system/buttons/Button.stories.tsx b/site/source/design-system/buttons/Button.stories.tsx
new file mode 100644
index 000000000..6540ce4d7
--- /dev/null
+++ b/site/source/design-system/buttons/Button.stories.tsx
@@ -0,0 +1,29 @@
+import { ComponentStory, ComponentMeta } from '@storybook/react'
+import { Button } from '@/design-system/buttons'
+
+// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
+export default {
+ component: Button,
+ // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
+ argTypes: {
+ children: { type: 'string' },
+ },
+} as ComponentMeta
+
+// More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
+const Template: ComponentStory = (args) =>
+
+export const Primary = Template.bind({})
+// More on args: https://storybook.js.org/docs/react/writing-stories/args
+Primary.args = {
+ size: 'XL',
+ color: 'primary',
+ children: 'Primary XL button',
+}
+
+export const Secondary = Template.bind({})
+Secondary.args = {
+ size: 'XS',
+ color: 'secondary',
+ children: 'Secondary XS button',
+}
diff --git a/site/source/design-system/buttons/Button.tsx b/site/source/design-system/buttons/Button.tsx
index a7fb4ad60..d852d472a 100644
--- a/site/source/design-system/buttons/Button.tsx
+++ b/site/source/design-system/buttons/Button.tsx
@@ -1,8 +1,8 @@
-import { FocusStyle } from 'DesignSystem/global-style'
+import { FocusStyle } from '@/design-system/global-style'
import {
GenericButtonOrLinkProps,
useButtonOrLink,
-} from 'DesignSystem/typography/link'
+} from '@/design-system/typography/link'
import React, { ForwardedRef, forwardRef } from 'react'
import styled, { css } from 'styled-components'
diff --git a/site/source/design-system/buttons/ButtonHelp.tsx b/site/source/design-system/buttons/ButtonHelp.tsx
index 8d1ae9622..a74b54cde 100644
--- a/site/source/design-system/buttons/ButtonHelp.tsx
+++ b/site/source/design-system/buttons/ButtonHelp.tsx
@@ -1,4 +1,4 @@
-import PopoverWithTrigger from 'DesignSystem/PopoverWithTrigger'
+import PopoverWithTrigger from '@/design-system/PopoverWithTrigger'
import React from 'react'
import { Trans } from 'react-i18next'
import styled from 'styled-components'
diff --git a/site/source/design-system/card/Article.tsx b/site/source/design-system/card/Article.tsx
index 79357c237..ddfb564a0 100644
--- a/site/source/design-system/card/Article.tsx
+++ b/site/source/design-system/card/Article.tsx
@@ -1,14 +1,14 @@
import { useButton } from '@react-aria/button'
-import { FocusStyle } from 'DesignSystem/global-style'
-import { Chevron } from 'DesignSystem/icons'
-import { H4 } from 'DesignSystem/typography/heading'
+import { FocusStyle } from '@/design-system/global-style'
+import { Chevron } from '@/design-system/icons'
+import { H4 } from '@/design-system/typography/heading'
import {
NewWindowLinkIcon,
StyledLink,
StyledLinkHover,
useExternalLinkProps,
-} from 'DesignSystem/typography/link'
-import { Body } from 'DesignSystem/typography/paragraphs'
+} from '@/design-system/typography/link'
+import { Body } from '@/design-system/typography/paragraphs'
import React, { useRef } from 'react'
import { Link as RouterLink } from 'react-router-dom'
import styled from 'styled-components'
diff --git a/site/source/design-system/card/Card.tsx b/site/source/design-system/card/Card.tsx
index a6aa512a9..f4e8f7c38 100644
--- a/site/source/design-system/card/Card.tsx
+++ b/site/source/design-system/card/Card.tsx
@@ -1,13 +1,13 @@
-import { StyledButton } from 'DesignSystem/buttons/Button'
-import { FocusStyle } from 'DesignSystem/global-style'
-import { H3, HeadingUnderline } from 'DesignSystem/typography/heading'
+import { StyledButton } from '@/design-system/buttons/Button'
+import { FocusStyle } from '@/design-system/global-style'
+import { H3, HeadingUnderline } from '@/design-system/typography/heading'
import {
GenericButtonOrLinkProps,
NewWindowLinkIcon,
useButtonOrLink,
useExternalLinkProps,
-} from 'DesignSystem/typography/link'
-import { Body } from 'DesignSystem/typography/paragraphs'
+} from '@/design-system/typography/link'
+import { Body } from '@/design-system/typography/paragraphs'
import React, { ReactHTML, useRef } from 'react'
import styled, { css, ThemeProvider } from 'styled-components'
diff --git a/site/source/design-system/card/SmallCard.tsx b/site/source/design-system/card/SmallCard.tsx
index b0aa41676..0ac917471 100644
--- a/site/source/design-system/card/SmallCard.tsx
+++ b/site/source/design-system/card/SmallCard.tsx
@@ -1,11 +1,11 @@
import { useButton } from '@react-aria/button'
-import { FocusStyle } from 'DesignSystem/global-style'
-import { H6 } from 'DesignSystem/typography/heading'
+import { FocusStyle } from '@/design-system/global-style'
+import { H6 } from '@/design-system/typography/heading'
import {
NewWindowLinkIcon,
useExternalLinkProps,
-} from 'DesignSystem/typography/link'
-import { SmallBody } from 'DesignSystem/typography/paragraphs'
+} from '@/design-system/typography/link'
+import { SmallBody } from '@/design-system/typography/paragraphs'
import React, { useRef } from 'react'
import { Link as RouterLink } from 'react-router-dom'
import styled from 'styled-components'
diff --git a/site/source/design-system/field/Checkbox.tsx b/site/source/design-system/field/Checkbox.tsx
index 8847ba611..03fd767a6 100644
--- a/site/source/design-system/field/Checkbox.tsx
+++ b/site/source/design-system/field/Checkbox.tsx
@@ -1,8 +1,8 @@
import { useCheckbox } from '@react-aria/checkbox'
import { useToggleState } from '@react-stately/toggle'
import { AriaCheckboxProps } from '@react-types/checkbox'
-import { FocusStyle } from 'DesignSystem/global-style'
-import { Body } from 'DesignSystem/typography/paragraphs'
+import { FocusStyle } from '@/design-system/global-style'
+import { Body } from '@/design-system/typography/paragraphs'
import { useRef } from 'react'
import styled from 'styled-components'
diff --git a/site/source/design-system/field/Radio.tsx b/site/source/design-system/field/Radio/Radio.tsx
similarity index 97%
rename from site/source/design-system/field/Radio.tsx
rename to site/source/design-system/field/Radio/Radio.tsx
index af6d93b9f..76faccc37 100644
--- a/site/source/design-system/field/Radio.tsx
+++ b/site/source/design-system/field/Radio/Radio.tsx
@@ -1,8 +1,8 @@
import { useRadio, useRadioGroup } from '@react-aria/radio'
import { RadioGroupState, useRadioGroupState } from '@react-stately/radio'
import { AriaRadioProps, RadioGroupProps } from '@react-types/radio'
-import { FocusStyle } from 'DesignSystem/global-style'
-import { Body } from 'DesignSystem/typography/paragraphs'
+import { FocusStyle } from '@/design-system/global-style'
+import { Body } from '@/design-system/typography/paragraphs'
import React, { createContext, useContext, useRef } from 'react'
import styled, { css } from 'styled-components'
diff --git a/site/source/design-system/field/Radio/RadioGroup.stories.tsx b/site/source/design-system/field/Radio/RadioGroup.stories.tsx
new file mode 100644
index 000000000..1654de246
--- /dev/null
+++ b/site/source/design-system/field/Radio/RadioGroup.stories.tsx
@@ -0,0 +1,24 @@
+import { ComponentStory, ComponentMeta } from '@storybook/react'
+
+import { Radio, RadioGroup } from './Radio'
+
+// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
+export default {
+ component: RadioGroup,
+ // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
+ // argTypes: {
+ // },
+} as ComponentMeta
+
+// More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
+const Template: ComponentStory = (args) => (
+
+ Radio A
+ Radio B
+ Radio C
+
+)
+
+export const Basic = Template.bind({})
+// More on args: https://storybook.js.org/docs/react/writing-stories/args
+Basic.args = {}
diff --git a/site/source/design-system/field/Radio/ToggleGroup.stories.tsx b/site/source/design-system/field/Radio/ToggleGroup.stories.tsx
new file mode 100644
index 000000000..7c7e34ecf
--- /dev/null
+++ b/site/source/design-system/field/Radio/ToggleGroup.stories.tsx
@@ -0,0 +1,24 @@
+import { ComponentStory, ComponentMeta } from '@storybook/react'
+
+import { Radio, ToggleGroup } from './Radio'
+
+// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
+export default {
+ component: ToggleGroup,
+ // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
+ // argTypes: {
+ // },
+} as ComponentMeta
+
+// More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
+const Template: ComponentStory = (args) => (
+
+ Radio A
+ Radio B
+ Radio C
+
+)
+
+export const Basic = Template.bind({})
+// More on args: https://storybook.js.org/docs/react/writing-stories/args
+Basic.args = {}
diff --git a/site/source/design-system/field/Radio/index.ts b/site/source/design-system/field/Radio/index.ts
new file mode 100644
index 000000000..18fe7a9f7
--- /dev/null
+++ b/site/source/design-system/field/Radio/index.ts
@@ -0,0 +1 @@
+export { Radio, RadioGroup, ToggleGroup } from './Radio'
diff --git a/site/source/design-system/field/SearchField.tsx b/site/source/design-system/field/SearchField.tsx
index 9df0f5b04..17ee1a857 100644
--- a/site/source/design-system/field/SearchField.tsx
+++ b/site/source/design-system/field/SearchField.tsx
@@ -5,8 +5,8 @@ import {
useSearchFieldState,
} from '@react-stately/searchfield'
import { AriaSearchFieldProps } from '@react-types/searchfield'
-import { Loader } from 'DesignSystem/icons/Loader'
-import { SearchIcon } from 'DesignSystem/icons/SearchIcon'
+import { Loader } from '@/design-system/icons/Loader'
+import { SearchIcon } from '@/design-system/icons/SearchIcon'
import { InputHTMLAttributes, useRef } from 'react'
import styled, { css } from 'styled-components'
import {
diff --git a/site/source/design-system/field/Select/index.tsx b/site/source/design-system/field/Select/index.tsx
index b78c8aeeb..dfed53b5d 100644
--- a/site/source/design-system/field/Select/index.tsx
+++ b/site/source/design-system/field/Select/index.tsx
@@ -4,7 +4,7 @@ import { HiddenSelect, useSelect } from '@react-aria/select'
import { mergeProps } from '@react-aria/utils'
import { useSelectState } from '@react-stately/select'
import type { AriaSelectProps } from '@react-types/select'
-import { CarretDown } from 'DesignSystem/icons/carret-down'
+import { CarretDown } from '@/design-system/icons/carret-down'
import { useEffect, useRef } from 'react'
import { useTranslation } from 'react-i18next'
import styled, { css } from 'styled-components'
diff --git a/site/source/design-system/field/TextField.tsx b/site/source/design-system/field/TextField.tsx
index cc6f4be05..21e65eccb 100644
--- a/site/source/design-system/field/TextField.tsx
+++ b/site/source/design-system/field/TextField.tsx
@@ -1,5 +1,5 @@
import { AriaTextFieldOptions, useTextField } from '@react-aria/textfield'
-import { ExtraSmallBody } from 'DesignSystem/typography/paragraphs'
+import { ExtraSmallBody } from '@/design-system/typography/paragraphs'
import { HTMLAttributes, RefObject, useRef } from 'react'
import styled, { css } from 'styled-components'
diff --git a/site/source/design-system/footer/column.tsx b/site/source/design-system/footer/column.tsx
index 25422ae52..763b80b66 100644
--- a/site/source/design-system/footer/column.tsx
+++ b/site/source/design-system/footer/column.tsx
@@ -1,5 +1,5 @@
import { Grid } from '@mui/material'
-import { H1 } from 'DesignSystem/typography/heading'
+import { H1 } from '@/design-system/typography/heading'
import { ReactNode } from 'react'
import styled from 'styled-components'
diff --git a/site/source/design-system/root.tsx b/site/source/design-system/root.tsx
index 72a2e58c8..7674b85bc 100644
--- a/site/source/design-system/root.tsx
+++ b/site/source/design-system/root.tsx
@@ -1,4 +1,4 @@
-import { theme as urssafTheme } from 'DesignSystem/theme'
+import { theme as urssafTheme } from '@/design-system/theme'
import { ReactNode } from 'react'
import { ThemeProvider } from 'styled-components'
diff --git a/site/source/design-system/switch/Switch.stories.tsx b/site/source/design-system/switch/Switch.stories.tsx
new file mode 100644
index 000000000..0183998d8
--- /dev/null
+++ b/site/source/design-system/switch/Switch.stories.tsx
@@ -0,0 +1,33 @@
+import { ComponentStory, ComponentMeta } from '@storybook/react'
+
+import { Switch } from '@/design-system/switch'
+
+// More on default export: https://storybook.js.org/docs/react/writing-stories/introduction#default-export
+export default {
+ component: Switch,
+ // More on argTypes: https://storybook.js.org/docs/react/api/argtypes
+ argTypes: {
+ children: {
+ type: 'string',
+ },
+ },
+} as ComponentMeta
+
+// More on component templates: https://storybook.js.org/docs/react/writing-stories/introduction#using-args
+const Template: ComponentStory = (args) =>
+
+export const Basic = Template.bind({})
+// More on args: https://storybook.js.org/docs/react/writing-stories/args
+Basic.args = {
+ children: 'Label',
+}
+
+export const Selected = Template.bind({})
+Selected.args = {
+ isSelected: true,
+}
+
+export const Disabled = Template.bind({})
+Disabled.args = {
+ isDisabled: true,
+}
diff --git a/site/source/design-system/switch/Switch.tsx b/site/source/design-system/switch/Switch.tsx
new file mode 100644
index 000000000..a6785cd89
--- /dev/null
+++ b/site/source/design-system/switch/Switch.tsx
@@ -0,0 +1,134 @@
+import { FocusStyle, SROnly } from '@/design-system/global-style'
+import { ReactNode, useRef } from 'react'
+import styled, { css } from 'styled-components'
+import { useToggleState } from '@react-stately/toggle'
+import { useSwitch } from '@react-aria/switch'
+import { Body } from '../typography/paragraphs'
+
+const HiddenInput = styled.input`
+ ${SROnly}
+`
+
+type Size = 'XL' | 'MD' | 'XS'
+
+const sizeDico = {
+ XS: '2rem',
+ MD: '3rem',
+ XL: '4rem',
+} as { [K in Size]: string }
+
+interface StyledProps {
+ checked: boolean
+ disabled: boolean
+ size: Size
+ light: boolean
+}
+
+const StyledSpan = styled.span`
+ position: relative;
+ left: ${({ checked }) =>
+ checked ? 'calc(100% - 2 * (var(--switch-size) / 5))' : '0'};
+ transition: left 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
+ padding: calc(var(--switch-size) / 5);
+ border-radius: inherit;
+ box-shadow: 0px 3px 1px 0px #0000000f, 0px 3px 8px 0px #00000026;
+ background-color: #ffffff;
+`
+
+const StyledSwitch = styled.span`
+ --switch-size: ${({ size }) => sizeDico[size]};
+ display: inline-flex;
+ transition: all 0.15s ease-in-out;
+ background-color: ${({ theme, checked }) =>
+ checked
+ ? theme.colors.bases.primary[700]
+ : theme.colors.extended.grey[500]};
+ font-family: ${({ theme }) => theme.fonts.main};
+ padding: 0.2rem;
+ margin: 0 ${({ theme }) => theme.spacings.xxs};
+ border-radius: var(--switch-size);
+ width: calc(var(--switch-size) + ${({ light }) => (light ? 4 : 0)}px);
+ ${({ light }) =>
+ light
+ ? css`
+ border: 2px #ffffffbf solid;
+ `
+ : ''}
+
+ &:focus-within {
+ ${FocusStyle}
+ }
+
+ &:hover ${StyledSpan} {
+ box-shadow: 0 0 0 0.5rem
+ ${({ disabled, checked, theme }) =>
+ disabled
+ ? ''
+ : checked
+ ? theme.colors.bases.primary[700]
+ : theme.colors.extended.grey[500]}42;
+ }
+ ${({ disabled, theme }) =>
+ disabled
+ ? css`
+ background-color: ${theme.colors.extended.grey[300]};
+ color: ${theme.colors.extended.grey[500]};
+ `
+ : ''}
+`
+
+const LabelBody = styled(Body)`
+ display: inline-flex;
+ align-items: center;
+ cursor: pointer;
+`
+
+const Text = styled.span`
+ margin-right: ${({ theme }) => theme.spacings.xxs};
+`
+
+type AriaSwitchProps = Parameters[0]
+
+export type SwitchProps = AriaSwitchProps & {
+ size?: Size
+ light?: boolean
+ children?: ReactNode
+ className?: string
+}
+
+export const Switch = (props: SwitchProps) => {
+ const {
+ size = 'MD',
+ light = false,
+ children,
+ className,
+ ...ariaProps
+ } = props
+ const state = useToggleState(ariaProps)
+ const ref = useRef(null)
+ const { inputProps } = useSwitch(ariaProps, state, ref)
+
+ const { isDisabled = false } = ariaProps
+ const { isSelected } = state
+
+ return (
+
+ {children && {children}}
+
+
+
+
+
+ )
+}
diff --git a/site/source/design-system/switch/index.ts b/site/source/design-system/switch/index.ts
new file mode 100644
index 000000000..dd5775ab0
--- /dev/null
+++ b/site/source/design-system/switch/index.ts
@@ -0,0 +1 @@
+export { Switch } from './Switch'
diff --git a/site/source/design-system/typography/link.tsx b/site/source/design-system/typography/link.tsx
index 57cc67446..ce223bf36 100644
--- a/site/source/design-system/typography/link.tsx
+++ b/site/source/design-system/typography/link.tsx
@@ -1,6 +1,6 @@
import { useButton } from '@react-aria/button'
import { AriaButtonProps } from '@react-types/button'
-import { FocusStyle } from 'DesignSystem/global-style'
+import { FocusStyle } from '@/design-system/global-style'
import React, {
ComponentPropsWithRef,
CSSProperties,
diff --git a/site/source/hooks/useSearchCompany.ts b/site/source/hooks/useSearchCompany.ts
index 9bec82810..acc8b5662 100644
--- a/site/source/hooks/useSearchCompany.ts
+++ b/site/source/hooks/useSearchCompany.ts
@@ -1,7 +1,7 @@
import {
FabriqueSocialEntreprise,
searchDenominationOrSiren,
-} from 'API/fabrique-social'
+} from '@/api/fabrique-social'
import { useEffect, useState } from 'react'
import { useDebounce } from './useDebounce'
diff --git a/site/source/pages/Accessibilité.tsx b/site/source/pages/Accessibilité.tsx
index 373360e3d..c3a698169 100644
--- a/site/source/pages/Accessibilité.tsx
+++ b/site/source/pages/Accessibilité.tsx
@@ -1,7 +1,7 @@
-import { H1, H2, H3 } from 'DesignSystem/typography/heading'
-import { Link } from 'DesignSystem/typography/link'
-import { Li, Ul } from 'DesignSystem/typography/list'
-import { Body, SmallBody } from 'DesignSystem/typography/paragraphs'
+import { H1, H2, H3 } from '@/design-system/typography/heading'
+import { Link } from '@/design-system/typography/link'
+import { Li, Ul } from '@/design-system/typography/list'
+import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import { Trans } from 'react-i18next'
import { TrackPage } from '../ATInternetTracking'
import Meta from '../components/utils/Meta'
diff --git a/site/source/pages/Budget/Budget.tsx b/site/source/pages/Budget/Budget.tsx
index dae104fda..d07410a20 100644
--- a/site/source/pages/Budget/Budget.tsx
+++ b/site/source/pages/Budget/Budget.tsx
@@ -1,10 +1,10 @@
import { Grid } from '@mui/material'
-import MoreInfosOnUs from 'Components/MoreInfosOnUs'
-import Emoji from 'Components/utils/Emoji'
-import { Markdown } from 'Components/utils/markdown'
-import { ScrollToTop } from 'Components/utils/Scroll'
-import { Item, Select } from 'DesignSystem/field/Select'
-import { H1, H2 } from 'DesignSystem/typography/heading'
+import MoreInfosOnUs from '@/components/MoreInfosOnUs'
+import Emoji from '@/components/utils/Emoji'
+import { Markdown } from '@/components/utils/markdown'
+import { ScrollToTop } from '@/components/utils/Scroll'
+import { Item, Select } from '@/design-system/field/Select'
+import { H1, H2 } from '@/design-system/typography/heading'
import { formatValue } from 'publicodes'
import { sum, uniq } from 'ramda'
import { useState } from 'react'
diff --git a/site/source/pages/Creer/AfterRegistration.tsx b/site/source/pages/Creer/AfterRegistration.tsx
index 5aaac66cc..6e49b20d3 100644
--- a/site/source/pages/Creer/AfterRegistration.tsx
+++ b/site/source/pages/Creer/AfterRegistration.tsx
@@ -1,13 +1,13 @@
-import { FromBottom } from 'Components/ui/animate'
-import { ScrollToTop } from 'Components/utils/Scroll'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { H1, H2 } from 'DesignSystem/typography/heading'
-import { Link } from 'DesignSystem/typography/link'
-import { Body } from 'DesignSystem/typography/paragraphs'
+import { FromBottom } from '@/components/ui/animate'
+import { ScrollToTop } from '@/components/utils/Scroll'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { H1, H2 } from '@/design-system/typography/heading'
+import { Link } from '@/design-system/typography/link'
+import { Body } from '@/design-system/typography/paragraphs'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { RootState } from 'Reducers/rootReducer'
+import { RootState } from '@/reducers/rootReducer'
import { TrackPage } from '../../ATInternetTracking'
import siret from './siret.jpg'
diff --git a/site/source/pages/Creer/CreationChecklist.tsx b/site/source/pages/Creer/CreationChecklist.tsx
index 3992f6128..9cdcb684b 100644
--- a/site/source/pages/Creer/CreationChecklist.tsx
+++ b/site/source/pages/Creer/CreationChecklist.tsx
@@ -2,26 +2,26 @@ import { Grid } from '@mui/material'
import {
checkCompanyCreationItem,
initializeCompanyCreationChecklist,
-} from 'Actions/companyCreationChecklistActions'
-import { resetCompanyStatusChoice } from 'Actions/companyStatusActions'
-import { FromBottom } from 'Components/ui/animate'
-import { CheckItem, Checklist } from 'Components/ui/Checklist'
-import Emoji from 'Components/utils/Emoji'
-import Scroll from 'Components/utils/Scroll'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Button } from 'DesignSystem/buttons'
-import { Article } from 'DesignSystem/card'
-import { Spacing } from 'DesignSystem/layout'
-import { H1, H2 } from 'DesignSystem/typography/heading'
-import { Link } from 'DesignSystem/typography/link'
-import { Li, Ul } from 'DesignSystem/typography/list'
-import { Body, SmallBody } from 'DesignSystem/typography/paragraphs'
+} from '@/actions/companyCreationChecklistActions'
+import { resetCompanyStatusChoice } from '@/actions/companyStatusActions'
+import { FromBottom } from '@/components/ui/animate'
+import { CheckItem, Checklist } from '@/components/ui/Checklist'
+import Emoji from '@/components/utils/Emoji'
+import Scroll from '@/components/utils/Scroll'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Button } from '@/design-system/buttons'
+import { Article } from '@/design-system/card'
+import { Spacing } from '@/design-system/layout'
+import { H1, H2 } from '@/design-system/typography/heading'
+import { Link } from '@/design-system/typography/link'
+import { Li, Ul } from '@/design-system/typography/list'
+import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import { useContext } from 'react'
import { Helmet } from 'react-helmet-async'
import { Trans, useTranslation } from 'react-i18next'
import { useDispatch, useSelector } from 'react-redux'
-import { RootState } from 'Reducers/rootReducer'
-import { LegalStatus } from 'Selectors/companyStatusSelectors'
+import { RootState } from '@/reducers/rootReducer'
+import { LegalStatus } from '@/selectors/companyStatusSelectors'
import { TrackPage } from '../../ATInternetTracking'
import StatutDescription from './StatutDescription'
diff --git a/site/source/pages/Creer/GuideStatut/AutoEntrepreneur.tsx b/site/source/pages/Creer/GuideStatut/AutoEntrepreneur.tsx
index 92d0caad1..b333e2ddc 100644
--- a/site/source/pages/Creer/GuideStatut/AutoEntrepreneur.tsx
+++ b/site/source/pages/Creer/GuideStatut/AutoEntrepreneur.tsx
@@ -1,7 +1,7 @@
-import SchemeComparaison from 'Components/SchemeComparaison'
-import { H2 } from 'DesignSystem/typography/heading'
-import { Link } from 'DesignSystem/typography/link'
-import { Body } from 'DesignSystem/typography/paragraphs'
+import SchemeComparaison from '@/components/SchemeComparaison'
+import { H2 } from '@/design-system/typography/heading'
+import { Link } from '@/design-system/typography/link'
+import { Body } from '@/design-system/typography/paragraphs'
import { Helmet } from 'react-helmet-async'
import { Trans, useTranslation } from 'react-i18next'
import { TrackPage } from '../../../ATInternetTracking'
diff --git a/site/source/pages/Creer/GuideStatut/DirectorStatus.tsx b/site/source/pages/Creer/GuideStatut/DirectorStatus.tsx
index d1388a44f..9c9f5af78 100644
--- a/site/source/pages/Creer/GuideStatut/DirectorStatus.tsx
+++ b/site/source/pages/Creer/GuideStatut/DirectorStatus.tsx
@@ -1,6 +1,6 @@
-import SchemeComparaison from 'Components/SchemeComparaison'
-import { H2 } from 'DesignSystem/typography/heading'
-import { Body } from 'DesignSystem/typography/paragraphs'
+import SchemeComparaison from '@/components/SchemeComparaison'
+import { H2 } from '@/design-system/typography/heading'
+import { Body } from '@/design-system/typography/paragraphs'
import { Helmet } from 'react-helmet-async'
import { Trans, useTranslation } from 'react-i18next'
import { TrackPage } from '../../../ATInternetTracking'
diff --git a/site/source/pages/Creer/GuideStatut/MinorityDirector.tsx b/site/source/pages/Creer/GuideStatut/MinorityDirector.tsx
index d903e711d..b35f5776c 100644
--- a/site/source/pages/Creer/GuideStatut/MinorityDirector.tsx
+++ b/site/source/pages/Creer/GuideStatut/MinorityDirector.tsx
@@ -1,12 +1,12 @@
import {
directorIsInAMinority,
useDispatchAndGoToNextQuestion,
-} from 'Actions/companyStatusActions'
-import AnswerGroup from 'DesignSystem/answer-group'
-import { Button } from 'DesignSystem/buttons'
-import { H2 } from 'DesignSystem/typography/heading'
-import { Li, Ul } from 'DesignSystem/typography/list'
-import { Body } from 'DesignSystem/typography/paragraphs'
+} from '@/actions/companyStatusActions'
+import AnswerGroup from '@/design-system/answer-group'
+import { Button } from '@/design-system/buttons'
+import { H2 } from '@/design-system/typography/heading'
+import { Li, Ul } from '@/design-system/typography/list'
+import { Body } from '@/design-system/typography/paragraphs'
import { Helmet } from 'react-helmet-async'
import { Trans, useTranslation } from 'react-i18next'
import { TrackPage } from '../../../ATInternetTracking'
diff --git a/site/source/pages/Creer/GuideStatut/NumberOfAssociate.tsx b/site/source/pages/Creer/GuideStatut/NumberOfAssociate.tsx
index 8a527523e..542ee47ca 100644
--- a/site/source/pages/Creer/GuideStatut/NumberOfAssociate.tsx
+++ b/site/source/pages/Creer/GuideStatut/NumberOfAssociate.tsx
@@ -1,11 +1,11 @@
import {
companyHasMultipleAssociates,
useDispatchAndGoToNextQuestion,
-} from 'Actions/companyStatusActions'
-import AnswerGroup from 'DesignSystem/answer-group'
-import { Button } from 'DesignSystem/buttons'
-import { H2 } from 'DesignSystem/typography/heading'
-import { Body, SmallBody } from 'DesignSystem/typography/paragraphs'
+} from '@/actions/companyStatusActions'
+import AnswerGroup from '@/design-system/answer-group'
+import { Button } from '@/design-system/buttons'
+import { H2 } from '@/design-system/typography/heading'
+import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import { Helmet } from 'react-helmet-async'
import { Trans, useTranslation } from 'react-i18next'
import { TrackPage } from '../../../ATInternetTracking'
diff --git a/site/source/pages/Creer/GuideStatut/PickLegalStatus.tsx b/site/source/pages/Creer/GuideStatut/PickLegalStatus.tsx
index bdaa4b097..5cc1c2e7b 100644
--- a/site/source/pages/Creer/GuideStatut/PickLegalStatus.tsx
+++ b/site/source/pages/Creer/GuideStatut/PickLegalStatus.tsx
@@ -1,7 +1,7 @@
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Button } from 'DesignSystem/buttons'
-import { H2, H3 } from 'DesignSystem/typography/heading'
-import { Body } from 'DesignSystem/typography/paragraphs'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Button } from '@/design-system/buttons'
+import { H2, H3 } from '@/design-system/typography/heading'
+import { Body } from '@/design-system/typography/paragraphs'
import { filter } from 'ramda'
import { Fragment, useContext } from 'react'
import { Helmet } from 'react-helmet-async'
@@ -10,7 +10,7 @@ import { useSelector } from 'react-redux'
import {
LegalStatus,
possibleStatusSelector,
-} from 'Selectors/companyStatusSelectors'
+} from '@/selectors/companyStatusSelectors'
import { TrackPage } from '../../../ATInternetTracking'
import StatutDescription from '../StatutDescription'
diff --git a/site/source/pages/Creer/GuideStatut/PreviousAnswers.tsx b/site/source/pages/Creer/GuideStatut/PreviousAnswers.tsx
index 8057036de..aba0c9d7f 100644
--- a/site/source/pages/Creer/GuideStatut/PreviousAnswers.tsx
+++ b/site/source/pages/Creer/GuideStatut/PreviousAnswers.tsx
@@ -1,12 +1,12 @@
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Link } from 'DesignSystem/typography/link'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Link } from '@/design-system/typography/link'
import { isNil } from 'ramda'
import { useContext } from 'react'
import { Trans } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { RootState } from 'Reducers/rootReducer'
+import { RootState } from '@/reducers/rootReducer'
import styled from 'styled-components'
-import { LegalStatusRequirements } from 'Types/companyTypes'
+import { LegalStatusRequirements } from '@/types/companyTypes'
const requirementToText = (
key: keyof LegalStatusRequirements,
diff --git a/site/source/pages/Creer/GuideStatut/SoleProprietorship.tsx b/site/source/pages/Creer/GuideStatut/SoleProprietorship.tsx
index 0c6967c2c..9c770f406 100644
--- a/site/source/pages/Creer/GuideStatut/SoleProprietorship.tsx
+++ b/site/source/pages/Creer/GuideStatut/SoleProprietorship.tsx
@@ -1,12 +1,12 @@
import {
isSoleProprietorship,
useDispatchAndGoToNextQuestion,
-} from 'Actions/companyStatusActions'
-import AnswerGroup from 'DesignSystem/answer-group'
-import { Button } from 'DesignSystem/buttons'
-import { H2 } from 'DesignSystem/typography/heading'
-import { Li, Ul } from 'DesignSystem/typography/list'
-import { Body } from 'DesignSystem/typography/paragraphs'
+} from '@/actions/companyStatusActions'
+import AnswerGroup from '@/design-system/answer-group'
+import { Button } from '@/design-system/buttons'
+import { H2 } from '@/design-system/typography/heading'
+import { Li, Ul } from '@/design-system/typography/list'
+import { Body } from '@/design-system/typography/paragraphs'
import { Helmet } from 'react-helmet-async'
import { Trans, useTranslation } from 'react-i18next'
import { TrackPage } from '../../../ATInternetTracking'
diff --git a/site/source/pages/Creer/GuideStatut/index.tsx b/site/source/pages/Creer/GuideStatut/index.tsx
index f5199777c..065e03f5a 100644
--- a/site/source/pages/Creer/GuideStatut/index.tsx
+++ b/site/source/pages/Creer/GuideStatut/index.tsx
@@ -1,14 +1,14 @@
-import { resetCompanyStatusChoice } from 'Actions/companyStatusActions'
-import { FromBottom } from 'Components/ui/animate'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { H1 } from 'DesignSystem/typography/heading'
-import { Link } from 'DesignSystem/typography/link'
+import { resetCompanyStatusChoice } from '@/actions/companyStatusActions'
+import { FromBottom } from '@/components/ui/animate'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { H1 } from '@/design-system/typography/heading'
+import { Link } from '@/design-system/typography/link'
import { dropWhile, toPairs } from 'ramda'
import { useContext, useEffect } from 'react'
import { Trans } from 'react-i18next'
import { useDispatch, useSelector } from 'react-redux'
import { Route, Switch, useLocation } from 'react-router-dom'
-import { RootState } from 'Reducers/rootReducer'
+import { RootState } from '@/reducers/rootReducer'
import { TrackChapter } from '../../../ATInternetTracking'
import AutoEntrepreneur from './AutoEntrepreneur'
import DirectorStatus from './DirectorStatus'
diff --git a/site/source/pages/Creer/Home.tsx b/site/source/pages/Creer/Home.tsx
index 92a6cc0fd..5220c39f6 100644
--- a/site/source/pages/Creer/Home.tsx
+++ b/site/source/pages/Creer/Home.tsx
@@ -1,18 +1,18 @@
import { Grid } from '@mui/material'
-import PageHeader from 'Components/PageHeader'
-import { FromBottom } from 'Components/ui/animate'
-import Meta from 'Components/utils/Meta'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Button } from 'DesignSystem/buttons'
-import { Card } from 'DesignSystem/card'
-import { H2 } from 'DesignSystem/typography/heading'
-import { Intro, SmallBody } from 'DesignSystem/typography/paragraphs'
+import PageHeader from '@/components/PageHeader'
+import { FromBottom } from '@/components/ui/animate'
+import Meta from '@/components/utils/Meta'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Button } from '@/design-system/buttons'
+import { Card } from '@/design-system/card'
+import { H2 } from '@/design-system/typography/heading'
+import { Intro, SmallBody } from '@/design-system/typography/paragraphs'
import { useContext } from 'react'
import { Helmet } from 'react-helmet-async'
import { Trans, useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { RootState } from 'Reducers/rootReducer'
-import { useNextQuestionUrl } from 'Selectors/companyStatusSelectors'
+import { RootState } from '@/reducers/rootReducer'
+import { useNextQuestionUrl } from '@/selectors/companyStatusSelectors'
import { TrackPage } from '../../ATInternetTracking'
import créerSvg from './créer.svg'
diff --git a/site/source/pages/Creer/StatutDescription.tsx b/site/source/pages/Creer/StatutDescription.tsx
index 54512e337..d2a2739b5 100644
--- a/site/source/pages/Creer/StatutDescription.tsx
+++ b/site/source/pages/Creer/StatutDescription.tsx
@@ -1,5 +1,5 @@
import { Trans } from 'react-i18next'
-import { LegalStatus } from 'Selectors/companyStatusSelectors'
+import { LegalStatus } from '@/selectors/companyStatusSelectors'
type Props = {
statut: LegalStatus
}
diff --git a/site/source/pages/Creer/index.tsx b/site/source/pages/Creer/index.tsx
index 0f8411a8d..f95a2ae05 100644
--- a/site/source/pages/Creer/index.tsx
+++ b/site/source/pages/Creer/index.tsx
@@ -1,5 +1,5 @@
-import { ScrollToTop } from 'Components/utils/Scroll'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
+import { ScrollToTop } from '@/components/utils/Scroll'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
import { useContext } from 'react'
import { Route, Switch, useLocation } from 'react-router-dom'
import { TrackChapter } from '../../ATInternetTracking'
diff --git a/site/source/pages/Dev/IntegrationTest.tsx b/site/source/pages/Dev/IntegrationTest.tsx
index fa0767669..5b7eb3fde 100644
--- a/site/source/pages/Dev/IntegrationTest.tsx
+++ b/site/source/pages/Dev/IntegrationTest.tsx
@@ -1,5 +1,5 @@
-import { Button } from 'DesignSystem/buttons'
-import { H2 } from 'DesignSystem/typography/heading'
+import { Button } from '@/design-system/buttons'
+import { H2 } from '@/design-system/typography/heading'
import { lazy, Suspense, useEffect, useMemo, useRef, useState } from 'react'
import useSimulatorsData from '../Simulateurs/metadata'
const LazyColorPicker = lazy(() => import('./ColorPicker'))
diff --git a/site/source/pages/Dev/Personas.tsx b/site/source/pages/Dev/Personas.tsx
index 3958ce809..46c058855 100644
--- a/site/source/pages/Dev/Personas.tsx
+++ b/site/source/pages/Dev/Personas.tsx
@@ -1,4 +1,4 @@
-import { H1, H2, H3 } from 'DesignSystem/typography/heading'
+import { H1, H2, H3 } from '@/design-system/typography/heading'
export default function Personas() {
return (
diff --git a/site/source/pages/Dev/Sitemap.tsx b/site/source/pages/Dev/Sitemap.tsx
index 54e282259..5a193f656 100644
--- a/site/source/pages/Dev/Sitemap.tsx
+++ b/site/source/pages/Dev/Sitemap.tsx
@@ -1,5 +1,5 @@
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { H1 } from 'DesignSystem/typography/heading'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { H1 } from '@/design-system/typography/heading'
import { useContext } from 'react'
import { generateSiteMap } from '../../sitePaths'
diff --git a/site/source/pages/Documentation.tsx b/site/source/pages/Documentation.tsx
index 0ccabfd1a..ab82b4fb8 100644
--- a/site/source/pages/Documentation.tsx
+++ b/site/source/pages/Documentation.tsx
@@ -1,17 +1,17 @@
import { Grid } from '@mui/material'
-import SearchRules from 'Components/search/SearchRules'
-import { FromBottom } from 'Components/ui/animate'
-import { useEngine } from 'Components/utils/EngineContext'
-import { Markdown } from 'Components/utils/markdown'
-import Meta from 'Components/utils/Meta'
-import { ScrollToTop } from 'Components/utils/Scroll'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Button } from 'DesignSystem/buttons'
-import { Spacing } from 'DesignSystem/layout'
-import { H1, H2, H3, H4, H5 } from 'DesignSystem/typography/heading'
-import { Link, StyledLink } from 'DesignSystem/typography/link'
-import { Li, Ul } from 'DesignSystem/typography/list'
-import { Body } from 'DesignSystem/typography/paragraphs'
+import SearchRules from '@/components/search/SearchRules'
+import { FromBottom } from '@/components/ui/animate'
+import { useEngine } from '@/components/utils/EngineContext'
+import { Markdown } from '@/components/utils/markdown'
+import Meta from '@/components/utils/Meta'
+import { ScrollToTop } from '@/components/utils/Scroll'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Button } from '@/design-system/buttons'
+import { Spacing } from '@/design-system/layout'
+import { H1, H2, H3, H4, H5 } from '@/design-system/typography/heading'
+import { Link, StyledLink } from '@/design-system/typography/link'
+import { Li, Ul } from '@/design-system/typography/list'
+import { Body } from '@/design-system/typography/paragraphs'
import rules, { DottedName } from 'modele-social'
import { getDocumentationSiteMap, RulePage } from 'publicodes-react'
import { ComponentType, useContext, useMemo } from 'react'
@@ -19,7 +19,7 @@ import { Helmet } from 'react-helmet-async'
import { Trans, useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'
import { Redirect, Route, useLocation } from 'react-router-dom'
-import { RootState } from 'Reducers/rootReducer'
+import { RootState } from '@/reducers/rootReducer'
import styled from 'styled-components'
import { TrackPage } from '../ATInternetTracking'
import RuleLink from '../components/RuleLink'
diff --git a/site/source/pages/Gerer/AideDéclarationIndépendant/ExplicationResultatFiscal.tsx b/site/source/pages/Gerer/AideDéclarationIndépendant/ExplicationResultatFiscal.tsx
index e2c289f47..215580c1a 100644
--- a/site/source/pages/Gerer/AideDéclarationIndépendant/ExplicationResultatFiscal.tsx
+++ b/site/source/pages/Gerer/AideDéclarationIndépendant/ExplicationResultatFiscal.tsx
@@ -1,6 +1,6 @@
-import ButtonHelp from 'DesignSystem/buttons/ButtonHelp'
-import { Li, Ul } from 'DesignSystem/typography/list'
-import { Body } from 'DesignSystem/typography/paragraphs'
+import ButtonHelp from '@/design-system/buttons/ButtonHelp'
+import { Li, Ul } from '@/design-system/typography/list'
+import { Body } from '@/design-system/typography/paragraphs'
export function ExplicationsResultatFiscal() {
return (
diff --git a/site/source/pages/Gerer/AideDéclarationIndépendant/Fields.tsx b/site/source/pages/Gerer/AideDéclarationIndépendant/Fields.tsx
index d7ff02dd4..9ec75f017 100644
--- a/site/source/pages/Gerer/AideDéclarationIndépendant/Fields.tsx
+++ b/site/source/pages/Gerer/AideDéclarationIndépendant/Fields.tsx
@@ -1,16 +1,16 @@
-import { updateSituation } from 'Actions/actions'
-import { ExplicableRule } from 'Components/conversation/Explicable'
-import RuleInput from 'Components/conversation/RuleInput'
-import { FromTop } from 'Components/ui/animate'
-import { EngineContext } from 'Components/utils/EngineContext'
-import { useNextQuestions } from 'Components/utils/useNextQuestion'
-import { H3 } from 'DesignSystem/typography/heading'
-import { Intro, SmallBody } from 'DesignSystem/typography/paragraphs'
+import { updateSituation } from '@/actions/actions'
+import { ExplicableRule } from '@/components/conversation/Explicable'
+import RuleInput from '@/components/conversation/RuleInput'
+import { FromTop } from '@/components/ui/animate'
+import { EngineContext } from '@/components/utils/EngineContext'
+import { useNextQuestions } from '@/components/utils/useNextQuestion'
+import { H3 } from '@/design-system/typography/heading'
+import { Intro, SmallBody } from '@/design-system/typography/paragraphs'
import { DottedName } from 'modele-social'
import { RuleNode } from 'publicodes'
import { useCallback, useContext } from 'react'
import { useDispatch, useSelector } from 'react-redux'
-import { situationSelector } from 'Selectors/simulationSelectors'
+import { situationSelector } from '@/selectors/simulationSelectors'
import { Question } from './index'
type SubSectionProp = {
diff --git a/site/source/pages/Gerer/AideDéclarationIndépendant/RésultatSimple.tsx b/site/source/pages/Gerer/AideDéclarationIndépendant/RésultatSimple.tsx
index e8aa0d4c5..0baca017c 100644
--- a/site/source/pages/Gerer/AideDéclarationIndépendant/RésultatSimple.tsx
+++ b/site/source/pages/Gerer/AideDéclarationIndépendant/RésultatSimple.tsx
@@ -1,14 +1,14 @@
import { Grid } from '@mui/material'
-import Value, { Condition } from 'Components/EngineValue'
-import RuleLink from 'Components/RuleLink'
-import { FromTop } from 'Components/ui/animate'
-import Emoji from 'Components/utils/Emoji'
-import { useEngine } from 'Components/utils/EngineContext'
-import { Markdown } from 'Components/utils/markdown'
-import { Article } from 'DesignSystem/card'
-import { H2, H3 } from 'DesignSystem/typography/heading'
-import { Link } from 'DesignSystem/typography/link'
-import { Body, Intro } from 'DesignSystem/typography/paragraphs'
+import Value, { Condition } from '@/components/EngineValue'
+import RuleLink from '@/components/RuleLink'
+import { FromTop } from '@/components/ui/animate'
+import Emoji from '@/components/utils/Emoji'
+import { useEngine } from '@/components/utils/EngineContext'
+import { Markdown } from '@/components/utils/markdown'
+import { Article } from '@/design-system/card'
+import { H2, H3 } from '@/design-system/typography/heading'
+import { Link } from '@/design-system/typography/link'
+import { Body, Intro } from '@/design-system/typography/paragraphs'
import { utils } from 'publicodes'
import { Trans } from 'react-i18next'
diff --git a/site/source/pages/Gerer/AideDéclarationIndépendant/RésultatsParFormulaire.tsx b/site/source/pages/Gerer/AideDéclarationIndépendant/RésultatsParFormulaire.tsx
index ccc9b067a..51570e8df 100644
--- a/site/source/pages/Gerer/AideDéclarationIndépendant/RésultatsParFormulaire.tsx
+++ b/site/source/pages/Gerer/AideDéclarationIndépendant/RésultatsParFormulaire.tsx
@@ -1,11 +1,11 @@
-import Value, { Condition } from 'Components/EngineValue'
-import RuleLink from 'Components/RuleLink'
-import { FromTop } from 'Components/ui/animate'
-import Emoji from 'Components/utils/Emoji'
-import { useEngine } from 'Components/utils/EngineContext'
-import { Markdown } from 'Components/utils/markdown'
-import ButtonHelp from 'DesignSystem/buttons/ButtonHelp'
-import { H2, H3 } from 'DesignSystem/typography/heading'
+import Value, { Condition } from '@/components/EngineValue'
+import RuleLink from '@/components/RuleLink'
+import { FromTop } from '@/components/ui/animate'
+import Emoji from '@/components/utils/Emoji'
+import { useEngine } from '@/components/utils/EngineContext'
+import { Markdown } from '@/components/utils/markdown'
+import ButtonHelp from '@/design-system/buttons/ButtonHelp'
+import { H2, H3 } from '@/design-system/typography/heading'
import { DottedName } from 'modele-social'
import { useMemo } from 'react'
import { Trans } from 'react-i18next'
diff --git a/site/source/pages/Gerer/AideDéclarationIndépendant/index.tsx b/site/source/pages/Gerer/AideDéclarationIndépendant/index.tsx
index dd86e23d2..f46f2da58 100644
--- a/site/source/pages/Gerer/AideDéclarationIndépendant/index.tsx
+++ b/site/source/pages/Gerer/AideDéclarationIndépendant/index.tsx
@@ -1,21 +1,21 @@
import { Grid } from '@mui/material'
-import { updateSituation } from 'Actions/actions'
-import RuleInput from 'Components/conversation/RuleInput'
-import { Condition, WhenAlreadyDefined } from 'Components/EngineValue'
-import PageHeader from 'Components/PageHeader'
-import PreviousSimulationBanner from 'Components/PreviousSimulationBanner'
-import { FromTop } from 'Components/ui/animate'
-import Warning from 'Components/ui/WarningBlock'
-import Emoji from 'Components/utils/Emoji'
-import useSimulationConfig from 'Components/utils/useSimulationConfig'
-import { Strong } from 'DesignSystem/typography'
-import { H2, H3 } from 'DesignSystem/typography/heading'
-import { Li, Ul } from 'DesignSystem/typography/list'
-import { Body, Intro, SmallBody } from 'DesignSystem/typography/paragraphs'
+import { updateSituation } from '@/actions/actions'
+import RuleInput from '@/components/conversation/RuleInput'
+import { Condition, WhenAlreadyDefined } from '@/components/EngineValue'
+import PageHeader from '@/components/PageHeader'
+import PreviousSimulationBanner from '@/components/PreviousSimulationBanner'
+import { FromTop } from '@/components/ui/animate'
+import Warning from '@/components/ui/WarningBlock'
+import Emoji from '@/components/utils/Emoji'
+import useSimulationConfig from '@/components/utils/useSimulationConfig'
+import { Strong } from '@/design-system/typography'
+import { H2, H3 } from '@/design-system/typography/heading'
+import { Li, Ul } from '@/design-system/typography/list'
+import { Body, Intro, SmallBody } from '@/design-system/typography/paragraphs'
import { useCallback } from 'react'
import { Trans } from 'react-i18next'
import { useDispatch, useSelector } from 'react-redux'
-import { situationSelector } from 'Selectors/simulationSelectors'
+import { situationSelector } from '@/selectors/simulationSelectors'
import styled from 'styled-components'
import { TrackPage } from '../../../ATInternetTracking'
import simulationConfig from './config.yaml'
diff --git a/site/source/pages/Gerer/AideOrganismeLocal.tsx b/site/source/pages/Gerer/AideOrganismeLocal.tsx
index f8e35341f..9d6b1bf2d 100644
--- a/site/source/pages/Gerer/AideOrganismeLocal.tsx
+++ b/site/source/pages/Gerer/AideOrganismeLocal.tsx
@@ -1,10 +1,10 @@
-import { FromTop } from 'Components/ui/animate'
-import { Button } from 'DesignSystem/buttons'
-import { H2 } from 'DesignSystem/typography/heading'
-import { Body } from 'DesignSystem/typography/paragraphs'
+import { FromTop } from '@/components/ui/animate'
+import { Button } from '@/design-system/buttons'
+import { H2 } from '@/design-system/typography/heading'
+import { Body } from '@/design-system/typography/paragraphs'
import { useTranslation } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { RootState } from 'Reducers/rootReducer'
+import { RootState } from '@/reducers/rootReducer'
import aideOrganismeSvg from './aideOrganisme.svg'
const aideMidiPyrenéesAutoEntrepreneur = (state: RootState) => {
diff --git a/site/source/pages/Gerer/DemandeMobilite/EndBlock.tsx b/site/source/pages/Gerer/DemandeMobilite/EndBlock.tsx
index 77e7d8309..c1c57488a 100644
--- a/site/source/pages/Gerer/DemandeMobilite/EndBlock.tsx
+++ b/site/source/pages/Gerer/DemandeMobilite/EndBlock.tsx
@@ -1,16 +1,16 @@
import { Grid } from '@mui/material'
import { BlobProvider } from '@react-pdf/renderer'
-import Emoji from 'Components/utils/Emoji'
-import { EngineContext, EngineProvider } from 'Components/utils/EngineContext'
-import { Button } from 'DesignSystem/buttons'
-import { Checkbox, TextField } from 'DesignSystem/field'
-import { Spacing } from 'DesignSystem/layout'
-import PopoverWithTrigger from 'DesignSystem/PopoverWithTrigger'
-import { Strong } from 'DesignSystem/typography'
-import { H2 } from 'DesignSystem/typography/heading'
-import { Link } from 'DesignSystem/typography/link'
-import { Li, Ul } from 'DesignSystem/typography/list'
-import { Body, Intro, SmallBody } from 'DesignSystem/typography/paragraphs'
+import Emoji from '@/components/utils/Emoji'
+import { EngineContext, EngineProvider } from '@/components/utils/EngineContext'
+import { Button } from '@/design-system/buttons'
+import { Checkbox, TextField } from '@/design-system/field'
+import { Spacing } from '@/design-system/layout'
+import PopoverWithTrigger from '@/design-system/PopoverWithTrigger'
+import { Strong } from '@/design-system/typography'
+import { H2 } from '@/design-system/typography/heading'
+import { Link } from '@/design-system/typography/link'
+import { Li, Ul } from '@/design-system/typography/list'
+import { Body, Intro, SmallBody } from '@/design-system/typography/paragraphs'
import { RuleNode, utils } from 'publicodes'
import { lazy, Suspense, useContext, useRef, useState } from 'react'
import SignaturePad from 'react-signature-pad-wrapper'
diff --git a/site/source/pages/Gerer/DemandeMobilite/FieldsPDF.tsx b/site/source/pages/Gerer/DemandeMobilite/FieldsPDF.tsx
index 5ea2f1294..ad2778d75 100644
--- a/site/source/pages/Gerer/DemandeMobilite/FieldsPDF.tsx
+++ b/site/source/pages/Gerer/DemandeMobilite/FieldsPDF.tsx
@@ -1,5 +1,5 @@
import PDFElement from '@react-pdf/renderer'
-import { EngineContext } from 'Components/utils/EngineContext'
+import { EngineContext } from '@/components/utils/EngineContext'
import { formatValue, RuleNode } from 'publicodes'
import { useContext } from 'react'
const { StyleSheet, Text, View } = PDFElement
diff --git a/site/source/pages/Gerer/DemandeMobilite/PDFDocument.tsx b/site/source/pages/Gerer/DemandeMobilite/PDFDocument.tsx
index 1eca8890f..c8679c0ec 100644
--- a/site/source/pages/Gerer/DemandeMobilite/PDFDocument.tsx
+++ b/site/source/pages/Gerer/DemandeMobilite/PDFDocument.tsx
@@ -1,5 +1,5 @@
import PDFElement from '@react-pdf/renderer'
-import urssafPng from 'Images/destinataires/Urssaf.png'
+import urssafPng from '@/images/destinataires/Urssaf.png'
import { RuleNode } from 'publicodes'
import FieldsPDF, { styles as fieldStyles } from './FieldsPDF'
import montserratUrl from './Montserrat-SemiBold.ttf'
diff --git a/site/source/pages/Gerer/DemandeMobilite/index.tsx b/site/source/pages/Gerer/DemandeMobilite/index.tsx
index 112377011..21e7d1f9d 100644
--- a/site/source/pages/Gerer/DemandeMobilite/index.tsx
+++ b/site/source/pages/Gerer/DemandeMobilite/index.tsx
@@ -1,16 +1,16 @@
import { Grid } from '@mui/material'
-import RuleInput from 'Components/conversation/RuleInput'
-import { WhenApplicable, WhenNotApplicable } from 'Components/EngineValue'
-import PageHeader from 'Components/PageHeader'
-import BrowserOnly from 'Components/utils/BrowserOnly'
-import Emoji from 'Components/utils/Emoji'
-import { EngineContext, EngineProvider } from 'Components/utils/EngineContext'
-import { Markdown } from 'Components/utils/markdown'
-import { usePersistingState } from 'Components/utils/persistState'
-import { Button } from 'DesignSystem/buttons'
-import { Spacing } from 'DesignSystem/layout'
-import { headings } from 'DesignSystem/typography'
-import { Intro, SmallBody } from 'DesignSystem/typography/paragraphs'
+import RuleInput from '@/components/conversation/RuleInput'
+import { WhenApplicable, WhenNotApplicable } from '@/components/EngineValue'
+import PageHeader from '@/components/PageHeader'
+import BrowserOnly from '@/components/utils/BrowserOnly'
+import Emoji from '@/components/utils/Emoji'
+import { EngineContext, EngineProvider } from '@/components/utils/EngineContext'
+import { Markdown } from '@/components/utils/markdown'
+import { usePersistingState } from '@/components/utils/persistState'
+import { Button } from '@/design-system/buttons'
+import { Spacing } from '@/design-system/layout'
+import { headings } from '@/design-system/typography'
+import { Intro, SmallBody } from '@/design-system/typography/paragraphs'
import { DottedName } from 'modele-social'
import Engine, {
PublicodesExpression,
@@ -26,7 +26,7 @@ import {
useState,
} from 'react'
import { TrackPage } from '../../../ATInternetTracking'
-import { hash } from '../../../utils'
+import { hash } from '@/utils'
import formulaire from './demande-mobilité.yaml'
import picture from './undraw_Traveling_re_weve.svg'
diff --git a/site/source/pages/Gerer/Embaucher.tsx b/site/source/pages/Gerer/Embaucher.tsx
index 0f4c7ef9d..577964216 100644
--- a/site/source/pages/Gerer/Embaucher.tsx
+++ b/site/source/pages/Gerer/Embaucher.tsx
@@ -1,17 +1,17 @@
import {
checkHiringItem,
initializeHiringChecklist,
-} from 'Actions/hiringChecklistAction'
-import { FromBottom } from 'Components/ui/animate'
-import { CheckItem, Checklist, ChecklistProps } from 'Components/ui/Checklist'
-import { H1, H2, H3 } from 'DesignSystem/typography/heading'
-import { Link } from 'DesignSystem/typography/link'
-import { Li, Ul } from 'DesignSystem/typography/list'
-import { Body } from 'DesignSystem/typography/paragraphs'
+} from '@/actions/hiringChecklistAction'
+import { FromBottom } from '@/components/ui/animate'
+import { CheckItem, Checklist, ChecklistProps } from '@/components/ui/Checklist'
+import { H1, H2, H3 } from '@/design-system/typography/heading'
+import { Link } from '@/design-system/typography/link'
+import { Li, Ul } from '@/design-system/typography/list'
+import { Body } from '@/design-system/typography/paragraphs'
import { Helmet } from 'react-helmet-async'
import { Trans, useTranslation } from 'react-i18next'
import { connect, useSelector } from 'react-redux'
-import { RootState } from 'Reducers/rootReducer'
+import { RootState } from '@/reducers/rootReducer'
import { TrackPage } from '../../ATInternetTracking'
import { SimulatorRessourceCard } from '../Simulateurs/cards/SimulatorRessourceCard'
diff --git a/site/source/pages/Gerer/Home.tsx b/site/source/pages/Gerer/Home.tsx
index 1f0d8ae88..3440eb7a4 100644
--- a/site/source/pages/Gerer/Home.tsx
+++ b/site/source/pages/Gerer/Home.tsx
@@ -2,25 +2,25 @@ import { Grid } from '@mui/material'
import {
specifyIfAutoEntrepreneur,
specifyIfDirigeantMajoritaire,
-} from 'Actions/existingCompanyActions'
-import CompanyDetails from 'Components/CompanyDetails'
-import PageHeader from 'Components/PageHeader'
-import { FromBottom } from 'Components/ui/animate'
-import { ScrollToTop } from 'Components/utils/Scroll'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Button } from 'DesignSystem/buttons'
-import { Container, Spacing } from 'DesignSystem/layout'
-import Popover from 'DesignSystem/Popover'
-import { H2 } from 'DesignSystem/typography/heading'
-import { Link } from 'DesignSystem/typography/link'
-import { Body, Intro } from 'DesignSystem/typography/paragraphs'
+} from '@/actions/existingCompanyActions'
+import CompanyDetails from '@/components/CompanyDetails'
+import PageHeader from '@/components/PageHeader'
+import { FromBottom } from '@/components/ui/animate'
+import { ScrollToTop } from '@/components/utils/Scroll'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Button } from '@/design-system/buttons'
+import { Container, Spacing } from '@/design-system/layout'
+import Popover from '@/design-system/Popover'
+import { H2 } from '@/design-system/typography/heading'
+import { Link } from '@/design-system/typography/link'
+import { Body, Intro } from '@/design-system/typography/paragraphs'
import { useContext, useEffect, useRef, useState } from 'react'
import { Helmet } from 'react-helmet-async'
import { Trans, useTranslation } from 'react-i18next'
import { useDispatch, useSelector } from 'react-redux'
import { Redirect } from 'react-router'
-import { Company } from 'Reducers/inFranceAppReducer'
-import { RootState } from 'Reducers/rootReducer'
+import { Company } from '@/reducers/inFranceAppReducer'
+import { RootState } from '@/reducers/rootReducer'
import styled from 'styled-components'
import { TrackPage } from '../../ATInternetTracking'
import { SimulateurCard } from '../Simulateurs/Home'
diff --git a/site/source/pages/Gerer/SécuritéSociale.tsx b/site/source/pages/Gerer/SécuritéSociale.tsx
index 27360cf4f..6e965fa22 100644
--- a/site/source/pages/Gerer/SécuritéSociale.tsx
+++ b/site/source/pages/Gerer/SécuritéSociale.tsx
@@ -1,6 +1,6 @@
-import { FromBottom } from 'Components/ui/animate'
-import { H1 } from 'DesignSystem/typography/heading'
-import { Body } from 'DesignSystem/typography/paragraphs'
+import { FromBottom } from '@/components/ui/animate'
+import { H1 } from '@/design-system/typography/heading'
+import { Body } from '@/design-system/typography/paragraphs'
import { Helmet } from 'react-helmet-async'
import { Trans, useTranslation } from 'react-i18next'
import { TrackPage } from '../../ATInternetTracking'
diff --git a/site/source/pages/Gerer/cards/ActivitePartielle.tsx b/site/source/pages/Gerer/cards/ActivitePartielle.tsx
index cdcba6ea2..2caf17493 100644
--- a/site/source/pages/Gerer/cards/ActivitePartielle.tsx
+++ b/site/source/pages/Gerer/cards/ActivitePartielle.tsx
@@ -1,6 +1,6 @@
-import Emoji from 'Components/utils/Emoji'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Card } from 'DesignSystem/card'
+import Emoji from '@/components/utils/Emoji'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Card } from '@/design-system/card'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
diff --git a/site/source/pages/Gerer/cards/AutoEntrepeneurCard.tsx b/site/source/pages/Gerer/cards/AutoEntrepeneurCard.tsx
index bb4c16202..bdc6e965b 100644
--- a/site/source/pages/Gerer/cards/AutoEntrepeneurCard.tsx
+++ b/site/source/pages/Gerer/cards/AutoEntrepeneurCard.tsx
@@ -1,4 +1,4 @@
-import { Article } from 'DesignSystem/card'
+import { Article } from '@/design-system/card'
import { Trans, useTranslation } from 'react-i18next'
export function AutoEntrepreneurCard() {
const { t } = useTranslation()
diff --git a/site/source/pages/Gerer/cards/DeclarationIndependantsCard.tsx b/site/source/pages/Gerer/cards/DeclarationIndependantsCard.tsx
index 78793efd4..20e5ee0fe 100644
--- a/site/source/pages/Gerer/cards/DeclarationIndependantsCard.tsx
+++ b/site/source/pages/Gerer/cards/DeclarationIndependantsCard.tsx
@@ -1,5 +1,5 @@
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Card } from 'DesignSystem/card'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Card } from '@/design-system/card'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
diff --git a/site/source/pages/Gerer/cards/DemarcheEmbauche.tsx b/site/source/pages/Gerer/cards/DemarcheEmbauche.tsx
index f88eb285d..d5944df3e 100644
--- a/site/source/pages/Gerer/cards/DemarcheEmbauche.tsx
+++ b/site/source/pages/Gerer/cards/DemarcheEmbauche.tsx
@@ -1,5 +1,5 @@
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Article } from 'DesignSystem/card'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Article } from '@/design-system/card'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
diff --git a/site/source/pages/Gerer/cards/ImpotSociete.tsx b/site/source/pages/Gerer/cards/ImpotSociete.tsx
index f76e034fd..92c022885 100644
--- a/site/source/pages/Gerer/cards/ImpotSociete.tsx
+++ b/site/source/pages/Gerer/cards/ImpotSociete.tsx
@@ -1,6 +1,6 @@
-import Emoji from 'Components/utils/Emoji'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Card } from 'DesignSystem/card'
+import Emoji from '@/components/utils/Emoji'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Card } from '@/design-system/card'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
diff --git a/site/source/pages/Gerer/cards/KBISCard.tsx b/site/source/pages/Gerer/cards/KBISCard.tsx
index bfedd2a4e..b4cb8c821 100644
--- a/site/source/pages/Gerer/cards/KBISCard.tsx
+++ b/site/source/pages/Gerer/cards/KBISCard.tsx
@@ -1,4 +1,4 @@
-import { Article } from 'DesignSystem/card'
+import { Article } from '@/design-system/card'
import { Trans, useTranslation } from 'react-i18next'
import { DirigeantOrNull } from '../Home'
diff --git a/site/source/pages/Gerer/cards/MobiliteCard.tsx b/site/source/pages/Gerer/cards/MobiliteCard.tsx
index a1cc74e54..47cad7237 100644
--- a/site/source/pages/Gerer/cards/MobiliteCard.tsx
+++ b/site/source/pages/Gerer/cards/MobiliteCard.tsx
@@ -1,5 +1,5 @@
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Article } from 'DesignSystem/card'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Article } from '@/design-system/card'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
diff --git a/site/source/pages/Gerer/cards/MontantEmbauche.tsx b/site/source/pages/Gerer/cards/MontantEmbauche.tsx
index 5e65f0c58..9a1731fac 100644
--- a/site/source/pages/Gerer/cards/MontantEmbauche.tsx
+++ b/site/source/pages/Gerer/cards/MontantEmbauche.tsx
@@ -1,6 +1,6 @@
-import Emoji from 'Components/utils/Emoji'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Card } from 'DesignSystem/card'
+import Emoji from '@/components/utils/Emoji'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Card } from '@/design-system/card'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
diff --git a/site/source/pages/Gerer/cards/SecuriteSocialeCard.tsx b/site/source/pages/Gerer/cards/SecuriteSocialeCard.tsx
index f29876f5a..9aad26126 100644
--- a/site/source/pages/Gerer/cards/SecuriteSocialeCard.tsx
+++ b/site/source/pages/Gerer/cards/SecuriteSocialeCard.tsx
@@ -1,5 +1,5 @@
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Article } from 'DesignSystem/card'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Article } from '@/design-system/card'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
diff --git a/site/source/pages/Gerer/index.tsx b/site/source/pages/Gerer/index.tsx
index 30e4a5175..504d13f9f 100644
--- a/site/source/pages/Gerer/index.tsx
+++ b/site/source/pages/Gerer/index.tsx
@@ -1,6 +1,6 @@
-import { ScrollToTop } from 'Components/utils/Scroll'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Link } from 'DesignSystem/typography/link'
+import { ScrollToTop } from '@/components/utils/Scroll'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Link } from '@/design-system/typography/link'
import { useContext } from 'react'
import { Trans } from 'react-i18next'
import { useRouteMatch } from 'react-router'
diff --git a/site/source/pages/Iframes/IframeFooter.tsx b/site/source/pages/Iframes/IframeFooter.tsx
index 17b0d78cb..3c6fd3bf2 100644
--- a/site/source/pages/Iframes/IframeFooter.tsx
+++ b/site/source/pages/Iframes/IframeFooter.tsx
@@ -1,5 +1,5 @@
-import Privacy from 'Components/layout/Footer/Privacy'
-import { Spacing } from 'DesignSystem/layout'
+import Privacy from '@/components/layout/Footer/Privacy'
+import { Spacing } from '@/design-system/layout'
export default function IframeFooter() {
return (
diff --git a/site/source/pages/Iframes/index.tsx b/site/source/pages/Iframes/index.tsx
index 57a64291d..a5255834a 100644
--- a/site/source/pages/Iframes/index.tsx
+++ b/site/source/pages/Iframes/index.tsx
@@ -1,5 +1,5 @@
-import { ThemeColorsProvider } from 'Components/utils/colors'
-import { IsEmbeded } from 'Components/utils/embeddedContext'
+import { ThemeColorsProvider } from '@/components/utils/colors'
+import { IsEmbeded } from '@/components/utils/embeddedContext'
import { useEffect } from 'react'
import { Helmet } from 'react-helmet-async'
import { Route, Switch } from 'react-router-dom'
diff --git a/site/source/pages/Landing/ContinueWithCompany.tsx b/site/source/pages/Landing/ContinueWithCompany.tsx
index e750bb966..6cf4d587d 100644
--- a/site/source/pages/Landing/ContinueWithCompany.tsx
+++ b/site/source/pages/Landing/ContinueWithCompany.tsx
@@ -1,11 +1,11 @@
import { Grid } from '@mui/material'
-import CompanyDetails from 'Components/CompanyDetails'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Card } from 'DesignSystem/card'
-import { H3 } from 'DesignSystem/typography/heading'
+import CompanyDetails from '@/components/CompanyDetails'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Card } from '@/design-system/card'
+import { H3 } from '@/design-system/typography/heading'
import { useContext } from 'react'
import { Trans } from 'react-i18next'
-import { Company } from 'reducers/inFranceAppReducer'
+import { Company } from '@/reducers/inFranceAppReducer'
type ContinueWithCompanyProps = {
company: Company
diff --git a/site/source/pages/Landing/Landing.tsx b/site/source/pages/Landing/Landing.tsx
index 0e8946206..4e4e695fa 100644
--- a/site/source/pages/Landing/Landing.tsx
+++ b/site/source/pages/Landing/Landing.tsx
@@ -1,18 +1,18 @@
import { Grid } from '@mui/material'
-import Footer from 'Components/layout/Footer/Footer'
-import Header from 'Components/layout/Header'
-import PageHeader from 'Components/PageHeader'
-import Meta from 'Components/utils/Meta'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Button } from 'DesignSystem/buttons'
-import { Container, Spacing } from 'DesignSystem/layout'
-import { H2 } from 'DesignSystem/typography/heading'
-import { Link } from 'DesignSystem/typography/link'
-import { Body, Intro } from 'DesignSystem/typography/paragraphs'
+import Footer from '@/components/layout/Footer/Footer'
+import Header from '@/components/layout/Header'
+import PageHeader from '@/components/PageHeader'
+import Meta from '@/components/utils/Meta'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Button } from '@/design-system/buttons'
+import { Container, Spacing } from '@/design-system/layout'
+import { H2 } from '@/design-system/typography/heading'
+import { Link } from '@/design-system/typography/link'
+import { Body, Intro } from '@/design-system/typography/paragraphs'
import { useContext } from 'react'
import { Trans } from 'react-i18next'
import { useSelector } from 'react-redux'
-import { RootState } from 'Reducers/rootReducer'
+import { RootState } from '@/reducers/rootReducer'
import { TrackPage } from '../../ATInternetTracking'
import { SimulateurCard } from '../Simulateurs/Home'
import useSimulatorsData from '../Simulateurs/metadata'
diff --git a/site/source/pages/Landing/SearchOrCreate.tsx b/site/source/pages/Landing/SearchOrCreate.tsx
index 2bf49e186..5ac9c4057 100644
--- a/site/source/pages/Landing/SearchOrCreate.tsx
+++ b/site/source/pages/Landing/SearchOrCreate.tsx
@@ -1,16 +1,16 @@
import { Grid } from '@mui/material'
-import { useSetEntreprise } from 'Actions/companyStatusActions'
-import { FabriqueSocialEntreprise } from 'API/fabrique-social'
-import { CompanySearchField } from 'Components/CompanySearchField'
-import Emoji from 'Components/utils/Emoji'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Button } from 'DesignSystem/buttons'
-import { H3 } from 'DesignSystem/typography/heading'
+import { useSetEntreprise } from '@/actions/companyStatusActions'
+import { FabriqueSocialEntreprise } from '@/api/fabrique-social'
+import { CompanySearchField } from '@/components/CompanySearchField'
+import Emoji from '@/components/utils/Emoji'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Button } from '@/design-system/buttons'
+import { H3 } from '@/design-system/typography/heading'
import { useCallback, useContext } from 'react'
import { Trans } from 'react-i18next'
import { useSelector } from 'react-redux'
import { useHistory } from 'react-router-dom'
-import { RootState } from 'Reducers/rootReducer'
+import { RootState } from '@/reducers/rootReducer'
import styled from 'styled-components'
export default function SearchOrCreate() {
diff --git a/site/source/pages/Nouveautes/Nouveautes.tsx b/site/source/pages/Nouveautes/Nouveautes.tsx
index db2cee1ac..c8f44e96f 100644
--- a/site/source/pages/Nouveautes/Nouveautes.tsx
+++ b/site/source/pages/Nouveautes/Nouveautes.tsx
@@ -1,16 +1,16 @@
import { Grid } from '@mui/material'
-import { determinant, hideNewsBanner } from 'Components/layout/NewsBanner'
-import MoreInfosOnUs from 'Components/MoreInfosOnUs'
-import Emoji from 'Components/utils/Emoji'
-import { MarkdownWithAnchorLinks } from 'Components/utils/markdown'
-import Meta from 'Components/utils/Meta'
-import { ScrollToTop } from 'Components/utils/Scroll'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Item, Select } from 'DesignSystem/field/Select'
-import { Container } from 'DesignSystem/layout'
-import { H1 } from 'DesignSystem/typography/heading'
-import { GenericButtonOrLinkProps, Link } from 'DesignSystem/typography/link'
-import { Body } from 'DesignSystem/typography/paragraphs'
+import { determinant, hideNewsBanner } from '@/components/layout/NewsBanner'
+import MoreInfosOnUs from '@/components/MoreInfosOnUs'
+import Emoji from '@/components/utils/Emoji'
+import { MarkdownWithAnchorLinks } from '@/components/utils/markdown'
+import Meta from '@/components/utils/Meta'
+import { ScrollToTop } from '@/components/utils/Scroll'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Item, Select } from '@/design-system/field/Select'
+import { Container } from '@/design-system/layout'
+import { H1 } from '@/design-system/typography/heading'
+import { GenericButtonOrLinkProps, Link } from '@/design-system/typography/link'
+import { Body } from '@/design-system/typography/paragraphs'
import { useContext, useEffect, useMemo, useState } from 'react'
import { Redirect, useHistory, useRouteMatch } from 'react-router-dom'
import styled from 'styled-components'
@@ -28,7 +28,7 @@ export default function Nouveautés() {
// bundle, that's why we only fetch it on this page.
const [data, setData] = useState([])
useEffect(() => {
- import('Data/releases.json').then(({ default: data }) => {
+ import('@/data/releases.json').then(({ default: data }) => {
setData(data)
})
}, [])
diff --git a/site/source/pages/Simulateurs/AidesEmbauche/index.tsx b/site/source/pages/Simulateurs/AidesEmbauche/index.tsx
index c200fb11f..6488e4181 100644
--- a/site/source/pages/Simulateurs/AidesEmbauche/index.tsx
+++ b/site/source/pages/Simulateurs/AidesEmbauche/index.tsx
@@ -1,24 +1,24 @@
import { Grid } from '@mui/material'
-import { HiddenOptionContext } from 'Components/conversation/ChoicesInput'
-import Conversation from 'Components/conversation/Conversation'
-import { FromTop } from 'Components/ui/animate'
-import Warning from 'Components/ui/WarningBlock'
-import Emoji from 'Components/utils/Emoji'
-import { useEngine } from 'Components/utils/EngineContext'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { useSimulationProgress } from 'Components/utils/useNextQuestion'
-import { useParamsFromSituation } from 'Components/utils/useSearchParamsSimulationSharing'
-import useSimulationConfig from 'Components/utils/useSimulationConfig'
-import { Card } from 'DesignSystem/card'
-import { H2, H3 } from 'DesignSystem/typography/heading'
-import { Link } from 'DesignSystem/typography/link'
-import { Body } from 'DesignSystem/typography/paragraphs'
+import { HiddenOptionContext } from '@/components/conversation/ChoicesInput'
+import Conversation from '@/components/conversation/Conversation'
+import { FromTop } from '@/components/ui/animate'
+import Warning from '@/components/ui/WarningBlock'
+import Emoji from '@/components/utils/Emoji'
+import { useEngine } from '@/components/utils/EngineContext'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { useSimulationProgress } from '@/components/utils/useNextQuestion'
+import { useParamsFromSituation } from '@/components/utils/useSearchParamsSimulationSharing'
+import useSimulationConfig from '@/components/utils/useSimulationConfig'
+import { Card } from '@/design-system/card'
+import { H2, H3 } from '@/design-system/typography/heading'
+import { Link } from '@/design-system/typography/link'
+import { Body } from '@/design-system/typography/paragraphs'
import { DottedName } from 'modele-social'
import Engine, { formatValue } from 'publicodes'
import { partition } from 'ramda'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
-import { SimulationConfig, Situation } from 'Reducers/rootReducer'
+import { SimulationConfig, Situation } from '@/reducers/rootReducer'
import { TrackPage } from '../../../ATInternetTracking'
type AideDescriptor = {
diff --git a/site/source/pages/Simulateurs/ArtisteAuteur.tsx b/site/source/pages/Simulateurs/ArtisteAuteur.tsx
index 08b3584a8..9cf55f9a2 100644
--- a/site/source/pages/Simulateurs/ArtisteAuteur.tsx
+++ b/site/source/pages/Simulateurs/ArtisteAuteur.tsx
@@ -1,13 +1,13 @@
-import { DistributionBranch } from 'Components/Distribution'
-import { Condition } from 'Components/EngineValue'
-import PeriodSwitch from 'Components/PeriodSwitch'
-import SimulateurWarning from 'Components/SimulateurWarning'
-import Simulation from 'Components/Simulation'
-import { InstitutionsPartenairesArtisteAuteur } from 'Components/simulationExplanation/InstitutionsPartenaires'
-import { SimulationGoal, SimulationGoals } from 'Components/Simulation'
-import { EngineContext } from 'Components/utils/EngineContext'
-import useSimulationConfig from 'Components/utils/useSimulationConfig'
-import { H2 } from 'DesignSystem/typography/heading'
+import { DistributionBranch } from '@/components/Distribution'
+import { Condition } from '@/components/EngineValue'
+import PeriodSwitch from '@/components/PeriodSwitch'
+import SimulateurWarning from '@/components/SimulateurWarning'
+import Simulation from '@/components/Simulation'
+import { InstitutionsPartenairesArtisteAuteur } from '@/components/simulationExplanation/InstitutionsPartenaires'
+import { SimulationGoal, SimulationGoals } from '@/components/Simulation'
+import { EngineContext } from '@/components/utils/EngineContext'
+import useSimulationConfig from '@/components/utils/useSimulationConfig'
+import { H2 } from '@/design-system/typography/heading'
import { useContext } from 'react'
import { Trans } from 'react-i18next'
import config from './configs/artiste-auteur.yaml'
diff --git a/site/source/pages/Simulateurs/AutoEntrepreneur.tsx b/site/source/pages/Simulateurs/AutoEntrepreneur.tsx
index 18a13338e..ce6449e3a 100644
--- a/site/source/pages/Simulateurs/AutoEntrepreneur.tsx
+++ b/site/source/pages/Simulateurs/AutoEntrepreneur.tsx
@@ -1,16 +1,16 @@
-import ChiffreAffairesActivitéMixte from 'Components/ChiffreAffairesActivitéMixte'
-import { WhenAlreadyDefined } from 'Components/EngineValue'
-import PeriodSwitch from 'Components/PeriodSwitch'
-import SimulateurWarning from 'Components/SimulateurWarning'
-import Simulation from 'Components/Simulation'
-import { InstitutionsPartenairesAutoEntrepreneur } from 'Components/simulationExplanation/InstitutionsPartenaires'
-import { SimulationGoal, SimulationGoals } from 'Components/Simulation'
-import StackedBarChart from 'Components/StackedBarChart'
-import { H2 } from 'DesignSystem/typography/heading'
+import ChiffreAffairesActivitéMixte from '@/components/ChiffreAffairesActivitéMixte'
+import { WhenAlreadyDefined } from '@/components/EngineValue'
+import PeriodSwitch from '@/components/PeriodSwitch'
+import SimulateurWarning from '@/components/SimulateurWarning'
+import Simulation from '@/components/Simulation'
+import { InstitutionsPartenairesAutoEntrepreneur } from '@/components/simulationExplanation/InstitutionsPartenaires'
+import { SimulationGoal, SimulationGoals } from '@/components/Simulation'
+import StackedBarChart from '@/components/StackedBarChart'
+import { H2 } from '@/design-system/typography/heading'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import { ThemeContext } from 'styled-components'
-import { SelectSimulationYear } from 'Components/SelectSimulationYear'
+import { SelectSimulationYear } from '@/components/SelectSimulationYear'
export default function AutoEntrepreneur() {
return (
diff --git a/site/source/pages/Simulateurs/ChômagePartiel.tsx b/site/source/pages/Simulateurs/ChômagePartiel.tsx
index 2a1004c92..13e1b35c6 100644
--- a/site/source/pages/Simulateurs/ChômagePartiel.tsx
+++ b/site/source/pages/Simulateurs/ChômagePartiel.tsx
@@ -1,11 +1,11 @@
-import RuleLink from 'Components/RuleLink'
-import Simulation from 'Components/Simulation'
-import { SimulationGoal, SimulationGoals } from 'Components/Simulation'
-import { FromTop } from 'Components/ui/animate'
-import Warning from 'Components/ui/WarningBlock'
-import { useIsEmbedded } from 'Components/utils/embeddedContext'
-import { useEngine } from 'Components/utils/EngineContext'
-import { Li, Ul } from 'DesignSystem/typography/list'
+import RuleLink from '@/components/RuleLink'
+import Simulation from '@/components/Simulation'
+import { SimulationGoal, SimulationGoals } from '@/components/Simulation'
+import { FromTop } from '@/components/ui/animate'
+import Warning from '@/components/ui/WarningBlock'
+import { useIsEmbedded } from '@/components/utils/embeddedContext'
+import { useEngine } from '@/components/utils/EngineContext'
+import { Li, Ul } from '@/design-system/typography/list'
import { DottedName } from 'modele-social'
import { formatValue } from 'publicodes'
import React, { useEffect, useState } from 'react'
diff --git a/site/source/pages/Simulateurs/Dividendes.tsx b/site/source/pages/Simulateurs/Dividendes.tsx
index ce128afdb..83806678f 100644
--- a/site/source/pages/Simulateurs/Dividendes.tsx
+++ b/site/source/pages/Simulateurs/Dividendes.tsx
@@ -1,15 +1,15 @@
-import { updateSituation } from 'Actions/actions'
-import { HiddenOptionContext } from 'Components/conversation/ChoicesInput'
-import { Condition } from 'Components/EngineValue'
-import Notifications from 'Components/Notifications'
-import Simulation from 'Components/Simulation'
-import { SimulationGoal, SimulationGoals } from 'Components/Simulation'
-import StackedBarChart from 'Components/StackedBarChart'
-import Warning from 'Components/ui/WarningBlock'
-import { useEngine } from 'Components/utils/EngineContext'
-import { Radio, ToggleGroup } from 'DesignSystem/field'
-import { H2 } from 'DesignSystem/typography/heading'
-import { Body } from 'DesignSystem/typography/paragraphs'
+import { updateSituation } from '@/actions/actions'
+import { HiddenOptionContext } from '@/components/conversation/ChoicesInput'
+import { Condition } from '@/components/EngineValue'
+import Notifications from '@/components/Notifications'
+import Simulation from '@/components/Simulation'
+import { SimulationGoal, SimulationGoals } from '@/components/Simulation'
+import StackedBarChart from '@/components/StackedBarChart'
+import Warning from '@/components/ui/WarningBlock'
+import { useEngine } from '@/components/utils/EngineContext'
+import { Radio, ToggleGroup } from '@/design-system/field'
+import { H2 } from '@/design-system/typography/heading'
+import { Body } from '@/design-system/typography/paragraphs'
import { DottedName } from 'modele-social'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/ActiviteCard/index.tsx b/site/source/pages/Simulateurs/EconomieCollaborative/ActiviteCard/index.tsx
index 1df0661f9..bd1a6f4c3 100644
--- a/site/source/pages/Simulateurs/EconomieCollaborative/ActiviteCard/index.tsx
+++ b/site/source/pages/Simulateurs/EconomieCollaborative/ActiviteCard/index.tsx
@@ -1,18 +1,18 @@
import { useButton } from '@react-aria/button'
-import Emoji from 'Components/utils/Emoji'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Button } from 'DesignSystem/buttons'
-import ButtonHelp from 'DesignSystem/buttons/ButtonHelp'
-import { CardContainer } from 'DesignSystem/card/Card'
-import { Checkbox } from 'DesignSystem/field'
-import { Spacing } from 'DesignSystem/layout'
-import { Tag } from 'DesignSystem/tag'
-import { H4 } from 'DesignSystem/typography/heading'
-import { Body, SmallBody } from 'DesignSystem/typography/paragraphs'
+import Emoji from '@/components/utils/Emoji'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Button } from '@/design-system/buttons'
+import ButtonHelp from '@/design-system/buttons/ButtonHelp'
+import { CardContainer } from '@/design-system/card/Card'
+import { Checkbox } from '@/design-system/field'
+import { Spacing } from '@/design-system/layout'
+import { Tag } from '@/design-system/tag'
+import { H4 } from '@/design-system/typography/heading'
+import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import React, { useCallback, useContext, useRef } from 'react'
import { Trans, useTranslation } from 'react-i18next'
import styled from 'styled-components'
-import { debounce } from '../../../../utils'
+import { debounce } from '@/utils'
import { toggleActivité } from '../actions'
import { getTranslatedActivité } from '../activitésData'
import { StoreContext } from '../StoreContext'
@@ -38,9 +38,10 @@ export const ActiviteCard = ({
const { language } = useTranslation().i18n
const toggle = useCallback(
// debounce to avoid double onClick call when clicking on checkbox
- debounce(1, () => {
- selected === undefined ? null : dispatch(toggleActivité(title))
- }),
+ () =>
+ debounce(1, () => {
+ selected === undefined ? null : dispatch?.(toggleActivité(title))
+ })(),
[dispatch, selected]
)
const { titre, explication, plateformes, icônes } = getTranslatedActivité(
diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/Activité.tsx b/site/source/pages/Simulateurs/EconomieCollaborative/Activité.tsx
index c84c77796..063de8272 100644
--- a/site/source/pages/Simulateurs/EconomieCollaborative/Activité.tsx
+++ b/site/source/pages/Simulateurs/EconomieCollaborative/Activité.tsx
@@ -1,11 +1,11 @@
-import { FromBottom } from 'Components/ui/animate'
-import Emoji from 'Components/utils/Emoji'
-import { Markdown } from 'Components/utils/markdown'
-import { ScrollToTop } from 'Components/utils/Scroll'
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Radio, RadioGroup } from 'DesignSystem/field'
-import { H1, H2, H3 } from 'DesignSystem/typography/heading'
-import { Body, SmallBody } from 'DesignSystem/typography/paragraphs'
+import { FromBottom } from '@/components/ui/animate'
+import Emoji from '@/components/utils/Emoji'
+import { Markdown } from '@/components/utils/markdown'
+import { ScrollToTop } from '@/components/utils/Scroll'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Radio, RadioGroup } from '@/design-system/field'
+import { H1, H2, H3 } from '@/design-system/typography/heading'
+import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import { formatValue } from 'publicodes'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
@@ -18,26 +18,31 @@ import Exonérations from './Exonérations'
import NextButton from './NextButton'
import { estExonéréeSelector } from './selectors'
import { StoreContext } from './StoreContext'
+import { getValueFrom } from '@/utils'
export type Activity = {
titre: string
explication: string
}
+interface Props {
+ match: { params: { title: string } }
+}
+
export default function Activité({
match: {
params: { title },
},
-}: any) {
+}: Props) {
const { language } = useTranslation().i18n
const sitePaths = useContext(SitePathsContext)
const { state, dispatch } = useContext(StoreContext)
const activité = getTranslatedActivité(title, language)
- if (!(title in state)) {
+ if (state && !(title in state)) {
return
}
- if (activité.activités) {
+ if (getValueFrom(activité, 'activités')) {
return (
@@ -52,15 +57,18 @@ export default function Activité({
titre)}
+ activités={(getValueFrom(activité, 'activités') ?? []).map(
+ ({ titre }: Activity) => titre
+ )}
/>
)
}
- const seuilRevenus = state[title].seuilRevenus
+ const seuilRevenus = state?.[title].seuilRevenus ?? undefined
const estExonérée = estExonéréeSelector(title)(state)
+
return (
@@ -78,11 +86,11 @@ export default function Activité({
)}
- {estExonérée ? null : activité['seuil pro'] === 0 ? (
+ {estExonérée ? null : getValueFrom(activité, 'seuil pro') === 0 ? (
Il s'agit d'une activité professionnelle
@@ -90,7 +98,8 @@ export default function Activité({
revenus professionnels dès le 1er euro gagné.
- ) : activité['seuil déclaration'] === 0 && !activité['seuil pro'] ? (
+ ) : getValueFrom(activité, 'seuil déclaration') === 0 &&
+ !getValueFrom(activité, 'seuil pro') ? (
Vous devez déclarez vos revenus aux impôts
Les revenus de cette activité sont imposables.
@@ -103,7 +112,7 @@ export default function Activité({
{
- dispatch(
+ dispatch?.(
selectSeuilRevenus(
title,
value as Parameters[1]
@@ -112,30 +121,29 @@ export default function Activité({
}}
defaultValue={seuilRevenus}
>
- {activité['seuil déclaration'] &&
- activité['seuil déclaration'] !== 0 && (
-
- inférieurs à{' '}
- {formatValue(activité['seuil déclaration'], {
- precision: 0,
- language,
- displayedUnit: '€',
- })}
-
- )}
+ {getValueFrom(activité, 'seuil déclaration') !== 0 && (
+
+ inférieurs à{' '}
+ {formatValue(getValueFrom(activité, 'seuil déclaration'), {
+ precision: 0,
+ language,
+ displayedUnit: '€',
+ })}
+
+ )}
inférieurs à{' '}
- {formatValue(activité['seuil pro'], {
+ {formatValue(getValueFrom(activité, 'seuil pro'), {
precision: 0,
language,
displayedUnit: '€',
})}
- {activité['seuil régime général'] && (
+ {getValueFrom(activité, 'seuil régime général') && (
{' '}
supérieurs à{' '}
- {formatValue(activité['seuil pro'], {
+ {formatValue(getValueFrom(activité, 'seuil pro'), {
precision: 0,
language,
displayedUnit: '€',
@@ -147,7 +155,8 @@ export default function Activité({
{' '}
supérieurs à{' '}
{formatValue(
- activité['seuil régime général'] || activité['seuil pro'],
+ getValueFrom(activité, 'seuil régime général') ||
+ getValueFrom(activité, 'seuil pro'),
{
precision: 0,
language,
diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/ActivitésSelection.tsx b/site/source/pages/Simulateurs/EconomieCollaborative/ActivitésSelection.tsx
index e4fcbd4ed..4f237f80d 100644
--- a/site/source/pages/Simulateurs/EconomieCollaborative/ActivitésSelection.tsx
+++ b/site/source/pages/Simulateurs/EconomieCollaborative/ActivitésSelection.tsx
@@ -1,10 +1,10 @@
import { Grid } from '@mui/material'
-import { FromBottom } from 'Components/ui/animate'
-import Emoji from 'Components/utils/Emoji'
-import { ScrollToTop } from 'Components/utils/Scroll'
-import { Spacing } from 'DesignSystem/layout'
-import { H1, H2 } from 'DesignSystem/typography/heading'
-import { Body, SmallBody } from 'DesignSystem/typography/paragraphs'
+import { FromBottom } from '@/components/ui/animate'
+import Emoji from '@/components/utils/Emoji'
+import { ScrollToTop } from '@/components/utils/Scroll'
+import { Spacing } from '@/design-system/layout'
+import { H1, H2 } from '@/design-system/typography/heading'
+import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import { intersection } from 'ramda'
import { useContext } from 'react'
import { Trans, useTranslation } from 'react-i18next'
@@ -98,7 +98,7 @@ export const ActivitéSelection = ({
<>
{activités.map((title) => {
- const selected = state[title].effectuée
+ const selected = state?.[title].effectuée
const answered = activitéRépondue.includes(title)
return (
diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/Exonérations.tsx b/site/source/pages/Simulateurs/EconomieCollaborative/Exonérations.tsx
index 1aa34f057..92cbb43bf 100644
--- a/site/source/pages/Simulateurs/EconomieCollaborative/Exonérations.tsx
+++ b/site/source/pages/Simulateurs/EconomieCollaborative/Exonérations.tsx
@@ -1,6 +1,6 @@
-import { CheckItem, Checklist } from 'Components/ui/Checklist'
-import { H2 } from 'DesignSystem/typography/heading'
-import { Body, SmallBody } from 'DesignSystem/typography/paragraphs'
+import { CheckItem, Checklist } from '@/components/ui/Checklist'
+import { H2 } from '@/design-system/typography/heading'
+import { Body, SmallBody } from '@/design-system/typography/paragraphs'
import { useContext } from 'react'
import { Trans } from 'react-i18next'
import { changeCritèreExonération } from './actions'
@@ -14,7 +14,10 @@ export default function Exonération({
}: any) {
const { state, dispatch } = useContext(StoreContext)
if (!exceptionsExonération && !exonération) return null
- const defaultChecked = state[activité].critèresExonération
+ const defaultChecked = state?.[activité].critèresExonération.reduce(
+ (acc, el, i) => ({ ...acc, [i]: el }),
+ {} as { [key: string]: boolean }
+ )
return (
<>
@@ -23,9 +26,9 @@ export default function Exonération({
- dispatch(changeCritèreExonération(activité, index, checked))
- }
+ onItemCheck={(index, checked) => {
+ dispatch?.(changeCritèreExonération(activité, index, checked))
+ }}
defaultChecked={defaultChecked}
>
{(exceptionsExonération || exonération).map(
diff --git a/site/source/pages/Simulateurs/EconomieCollaborative/NextButton.tsx b/site/source/pages/Simulateurs/EconomieCollaborative/NextButton.tsx
index 1d67f3419..4acd69c8e 100644
--- a/site/source/pages/Simulateurs/EconomieCollaborative/NextButton.tsx
+++ b/site/source/pages/Simulateurs/EconomieCollaborative/NextButton.tsx
@@ -1,5 +1,5 @@
-import { SitePathsContext } from 'Components/utils/SitePathsContext'
-import { Button } from 'DesignSystem/buttons'
+import { SitePathsContext } from '@/components/utils/SitePathsContext'
+import { Button } from '@/design-system/buttons'
import { useContext } from 'react'
import { Trans } from 'react-i18next'
import { activitéVue } from './actions'
@@ -22,7 +22,7 @@ export default function NextButton({ activité, disabled }: NextButtonProps) {
-