Skip to content

Commit

Permalink
Merge pull request #953 from betagouv/main
Browse files Browse the repository at this point in the history
MEP
  • Loading branch information
charlescd authored Nov 14, 2024
2 parents 0999de5 + ed36b4e commit 7596054
Show file tree
Hide file tree
Showing 9 changed files with 65 additions and 34 deletions.
6 changes: 3 additions & 3 deletions website/src/landings/manualLandingsUtils.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,19 +70,19 @@ export function NarrowAndCentered({children, narrower = false}: ChildrenProps &
)
}

export function LinkToFichePratique({url, url2}: {url: string; url2?: string}) {
export function LinkToFichePratique({url, url2, text, text2}: {url: string; url2?: string; text?: string; text2?: string}) {
return (
<p className="mt-8 mb-0">
Pour en savoir plus sur vos droits, rendez-vous sur{' '}
<Link target="_blank" href={url}>
{url}
{text ?? url}
</Link>
{url2 ? (
<>
{' '}
et{' '}
<Link target="_blank" href={url2}>
{url2}
{text2 ?? url2}
</Link>
</>
) : null}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {
AlternatingPurpleBands,
getManualLpButtonProps,
HighlightBlue,
HighlightPurple,
LinkToFichePratique,
LpColoredBand,
NarrowAndCentered,
WithSuperheroIllustration,
getManualLpButtonProps,
} from '@/landings/manualLandingsUtils'

import Button from '@codegouvfr/react-dsfr/Button'
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {notFound} from 'next/navigation'

export function blackFridayAboFraisCaches(props: PageComponentProps) {
Expand Down Expand Up @@ -108,7 +109,9 @@ export function blackFridayAboFraisCaches(props: PageComponentProps) {
</NarrowAndCentered>
<LinkToFichePratique
url="https://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/pieges-sur-les-sites-de-commerce-en-ligne-attention-aux-dark-patterns"
text="la fiche pratique Dark pattern"
url2="https://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/abonnements-caches"
text2="la fiche pratique Abonnements cachés"
/>
</LpColoredBand>
</FullWidthPageContainer>
Expand Down
12 changes: 8 additions & 4 deletions website/src/reusablePages/manual_landings/blackFridayColis.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {
AlternatingPurpleBands,
getManualLpButtonProps,
HighlightBlue,
HighlightPurple,
LinkToFichePratique,
LpColoredBand,
NarrowAndCentered,
WithSuperheroIllustration,
getManualLpButtonProps,
} from '@/landings/manualLandingsUtils'

import Button from '@codegouvfr/react-dsfr/Button'
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {notFound} from 'next/navigation'

export function blackFridayColis(props: PageComponentProps) {
Expand Down Expand Up @@ -112,7 +113,10 @@ export function blackFridayColis(props: PageComponentProps) {
</p>
{button}
</NarrowAndCentered>
<LinkToFichePratique url="https://www.economie.gouv.fr/dgccrf/les-fiches-pratiques/livraison-quelles-sont-les-obligations-du-professionnel-et-les-recours" />
<LinkToFichePratique
url="https://www.economie.gouv.fr/dgccrf/les-fiches-pratiques/livraison-quelles-sont-les-obligations-du-professionnel-et-les-recours"
text="la fiche pratique Droits et obligations du professionnel en matière de livraison"
/>
</LpColoredBand>
</FullWidthPageContainer>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {
AlternatingPurpleBands,
getManualLpButtonProps,
HighlightBlue,
HighlightPurple,
LinkToFichePratique,
LpColoredBand,
NarrowAndCentered,
WithSuperheroIllustration,
getManualLpButtonProps,
} from '@/landings/manualLandingsUtils'

import Button from '@codegouvfr/react-dsfr/Button'
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {notFound} from 'next/navigation'

export function blackFridayDarkPatterns(props: PageComponentProps) {
Expand Down Expand Up @@ -117,7 +118,10 @@ export function blackFridayDarkPatterns(props: PageComponentProps) {
</p>
{button}
</NarrowAndCentered>
<LinkToFichePratique url="https://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/pieges-sur-les-sites-de-commerce-en-ligne-attention-aux-dark-patterns" />
<LinkToFichePratique
url="https://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/pieges-sur-les-sites-de-commerce-en-ligne-attention-aux-dark-patterns"
text="la fiche pratique Dark pattern"
/>
</LpColoredBand>
</FullWidthPageContainer>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {
AlternatingPurpleBands,
getManualLpButtonProps,
HighlightBlue,
HighlightPurple,
LinkToFichePratique,
LpColoredBand,
NarrowAndCentered,
WithSuperheroIllustration,
getManualLpButtonProps,
} from '@/landings/manualLandingsUtils'

import Button from '@codegouvfr/react-dsfr/Button'
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {notFound} from 'next/navigation'

export function blackFridayFausseReduction(props: PageComponentProps) {
Expand Down Expand Up @@ -100,7 +101,10 @@ export function blackFridayFausseReduction(props: PageComponentProps) {
</p>
{button}
</NarrowAndCentered>
<LinkToFichePratique url="https://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/Annonce-de-reduction-de-prix" />
<LinkToFichePratique
url="https://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/Annonce-de-reduction-de-prix"
text="la fiche pratique Fausses réductions de prix"
/>
</LpColoredBand>
</FullWidthPageContainer>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {
AlternatingPurpleBands,
getManualLpButtonProps,
HighlightBlue,
HighlightPurple,
LinkToFichePratique,
LpColoredBand,
NarrowAndCentered,
getManualLpButtonProps,
} from '@/landings/manualLandingsUtils'

import Button from '@codegouvfr/react-dsfr/Button'
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {notFound} from 'next/navigation'

export function blackFridayFauxStocks(props: PageComponentProps) {
Expand Down Expand Up @@ -94,7 +95,10 @@ export function blackFridayFauxStocks(props: PageComponentProps) {
</p>
{button}
</NarrowAndCentered>
<LinkToFichePratique url="https://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/pieges-sur-les-sites-de-commerce-en-ligne-attention-aux-dark-patterns" />
<LinkToFichePratique
url="https://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/pieges-sur-les-sites-de-commerce-en-ligne-attention-aux-dark-patterns"
text="la fiche pratique Dark pattern"
/>
</LpColoredBand>
</FullWidthPageContainer>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {
AlternatingPurpleBands,
getManualLpButtonProps,
HighlightBlue,
HighlightPurple,
LinkToFichePratique,
LpColoredBand,
NarrowAndCentered,
WithSuperheroIllustration,
getManualLpButtonProps,
} from '@/landings/manualLandingsUtils'

import Button from '@codegouvfr/react-dsfr/Button'
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {notFound} from 'next/navigation'

export function blackFridayRetractation(props: PageComponentProps) {
Expand Down Expand Up @@ -113,7 +114,10 @@ export function blackFridayRetractation(props: PageComponentProps) {
</p>
{button}
</NarrowAndCentered>
<LinkToFichePratique url="https://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/Delais-de-reflexion-ou-de-retractation" />
<LinkToFichePratique
url="https://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/Delais-de-reflexion-ou-de-retractation"
text="la fiche pratique Délai de réflexion ou de rétractation"
/>
</LpColoredBand>
</FullWidthPageContainer>
)
Expand Down
12 changes: 8 additions & 4 deletions website/src/reusablePages/manual_landings/blackFridaySav.tsx
Original file line number Diff line number Diff line change
@@ -1,16 +1,17 @@
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {
AlternatingPurpleBands,
getManualLpButtonProps,
HighlightBlue,
HighlightPurple,
LinkToFichePratique,
LpColoredBand,
NarrowAndCentered,
WithSuperheroIllustration,
getManualLpButtonProps,
} from '@/landings/manualLandingsUtils'

import Button from '@codegouvfr/react-dsfr/Button'
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {notFound} from 'next/navigation'

export function blackFridaySav(props: PageComponentProps) {
Expand Down Expand Up @@ -112,7 +113,10 @@ export function blackFridaySav(props: PageComponentProps) {
</p>
{button}
</NarrowAndCentered>
<LinkToFichePratique url="https://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/le-service-apres-vente" />
<LinkToFichePratique
url="https://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/le-service-apres-vente"
text="la fiche pratique Service Après Vente"
/>
</LpColoredBand>
</FullWidthPageContainer>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,15 +1,16 @@
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {
AlternatingPurpleBands,
getManualLpButtonProps,
HighlightBlue,
HighlightPurple,
LinkToFichePratique,
LpColoredBand,
NarrowAndCentered,
getManualLpButtonProps,
} from '@/landings/manualLandingsUtils'

import Button from '@codegouvfr/react-dsfr/Button'
import {FullWidthPageContainer} from '@/components_simple/PageContainers'
import {PageComponentProps} from '@/core/metadatas'
import {notFound} from 'next/navigation'

export function blackFridaySitesFrauduleux(props: PageComponentProps) {
Expand Down Expand Up @@ -108,7 +109,10 @@ export function blackFridaySitesFrauduleux(props: PageComponentProps) {
</p>
{button}
</NarrowAndCentered>
<LinkToFichePratique url="https://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/acheter-sur-internet" />
<LinkToFichePratique
url="https://www.economie.gouv.fr/dgccrf/Publications/Vie-pratique/Fiches-pratiques/acheter-sur-internet"
text="la fiche pratique Acheter sur internet"
/>
</LpColoredBand>
</FullWidthPageContainer>
)
Expand Down

0 comments on commit 7596054

Please sign in to comment.