Skip to content

Commit

Permalink
refactor: remove dynamic ssr: false
Browse files Browse the repository at this point in the history
  • Loading branch information
arthurlbrjc committed Dec 11, 2024
1 parent 3a42031 commit 7b9210e
Show file tree
Hide file tree
Showing 11 changed files with 18 additions and 37 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,20 +32,16 @@ import { useConseiller } from 'utils/conseiller/conseillerContext'
import { usePortefeuille } from 'utils/portefeuilleContext'

const FicheBeneficiaireMilo = dynamic(
() => import('components/jeune/FicheBeneficiaireMilo'),
{ ssr: false }
() => import('components/jeune/FicheBeneficiaireMilo')
)
const FicheBeneficiairePasMilo = dynamic(
() => import('components/jeune/FicheBeneficiairePasMilo'),
{ ssr: false }
() => import('components/jeune/FicheBeneficiairePasMilo')
)
const DeleteBeneficiaireActifModal = dynamic(
() => import('components/jeune/DeleteBeneficiaireActifModal'),
{ ssr: false }
() => import('components/jeune/DeleteBeneficiaireActifModal')
)
const DeleteJeuneInactifModal = dynamic(
() => import('components/jeune/DeleteJeuneInactifModal'),
{ ssr: false }
() => import('components/jeune/DeleteJeuneInactifModal')
)

function FicheBeneficiairePage(props: FicheBeneficiaireProps) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,10 @@ import { useConseiller } from 'utils/conseiller/conseillerContext'
import { usePortefeuille } from 'utils/portefeuilleContext'

const ConfirmationDeleteConseillerModal = dynamic(
() => import('components/ConfirmationDeleteConseillerModal'),
{ ssr: false }
() => import('components/ConfirmationDeleteConseillerModal')
)
const ConfirmationSuppressionCompteConseillerModal = dynamic(
() => import('components/ConfirmationSuppressionCompteConseillerModal'),
{ ssr: false }
() => import('components/ConfirmationSuppressionCompteConseillerModal')
)

type ProfilProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@ type StructureReaffectation =
| StructureConseiller.POLE_EMPLOI_AIJ

const ConseillerIntrouvableSuggestionModal = dynamic(
() => import('components/ConseillerIntrouvableSuggestionModal'),
{ ssr: false }
() => import('components/ConseillerIntrouvableSuggestionModal')
)

type ReaffectationProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ import { toFrenchDateTime, toShortDate } from 'utils/date'
import { usePortefeuille } from 'utils/portefeuilleContext'

const DesinscriptionBeneficiaireModal = dynamic(
() => import('components/session-imilo/DesinscriptionBeneficiaireModal'),
{ ssr: false }
() => import('components/session-imilo/DesinscriptionBeneficiaireModal')
)

type DetailSessionProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,16 +30,12 @@ import { useConfirmBeforeLeaving } from 'utils/hooks/useConfirmBeforeLeaving'
import { usePortefeuille } from 'utils/portefeuilleContext'

const ConfirmationUpdateRdvModal = dynamic(
() => import('components/ConfirmationUpdateRdvModal'),
{ ssr: false }
() => import('components/ConfirmationUpdateRdvModal')
)
const LeavePageConfirmationModal = dynamic(
() => import('components/LeavePageConfirmationModal'),
{ ssr: false }
() => import('components/LeavePageConfirmationModal')
)
const DeleteRdvModal = dynamic(() => import('components/rdv/DeleteRdvModal'), {
ssr: false,
})
const DeleteRdvModal = dynamic(() => import('components/rdv/DeleteRdvModal'))

export type EditionRdvProps = {
conseillerEstObservateur: boolean
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ import { ApiError } from 'utils/httpClient'
import { usePortefeuille } from 'utils/portefeuilleContext'

const LeavePageConfirmationModal = dynamic(
() => import('components/LeavePageConfirmationModal'),
{ ssr: false }
() => import('components/LeavePageConfirmationModal')
)

type EnvoiMessageGroupeProps = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,7 @@ import { unsafeRandomId } from 'utils/helpers'
import { usePortefeuille } from 'utils/portefeuilleContext'

const ConfirmationDeleteListeDiffusionModal = dynamic(
() => import('components/ConfirmationDeleteListeDiffusionModal'),
{ ssr: false }
() => import('components/ConfirmationDeleteListeDiffusionModal')
)

type EditionListeDiffusionProps = {
Expand Down
3 changes: 1 addition & 2 deletions components/EncartAgenceRequise.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,7 @@ import { trackEvent } from 'utils/analytics/matomo'
import { usePortefeuille } from 'utils/portefeuilleContext'

const RenseignementAgenceModal = dynamic(
() => import('components/RenseignementAgenceModal'),
{ ssr: false }
() => import('components/RenseignementAgenceModal')
)

type EncartAgenceRequiseProps = {
Expand Down
3 changes: 1 addition & 2 deletions components/chat/ChatRoom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@ import { useConseiller } from 'utils/conseiller/conseillerContext'
import { usePortefeuille } from 'utils/portefeuilleContext'

const MessageImportantModal = dynamic(
() => import('components/chat/MessageImportantModal'),
{ ssr: false }
() => import('components/chat/MessageImportantModal')
)

type ChatRoomProps = {
Expand Down
3 changes: 1 addition & 2 deletions components/jeune/DetailsJeune.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@ import { useAlerte } from 'utils/alerteContext'
import { trackEvent } from 'utils/analytics/matomo'

const UpdateIdentifiantPartenaireModal = dynamic(
() => import('components/jeune/UpdateIdentifiantPartenaireModal'),
{ ssr: false }
() => import('components/jeune/UpdateIdentifiantPartenaireModal')
)

interface DetailsJeuneProps {
Expand Down
6 changes: 2 additions & 4 deletions components/jeune/TableauBeneficiaires.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,10 @@ import { useConseiller } from 'utils/conseiller/conseillerContext'
import { toShortDate } from 'utils/date'

const TableauBeneficiairesMilo = dynamic(
() => import('components/jeune/TableauBeneficiairesMilo'),
{ ssr: false }
() => import('components/jeune/TableauBeneficiairesMilo')
)
const TableauBeneficiairesPasMilo = dynamic(
() => import('components/jeune/TableauBeneficiairesPasMilo'),
{ ssr: false }
() => import('components/jeune/TableauBeneficiairesPasMilo')
)

type TableauBeneficiairesProps = {
Expand Down

0 comments on commit 7b9210e

Please sign in to comment.