Skip to content

Commit c5c35b1

Browse files
committed
Fix next setup
1 parent 5f9179d commit c5c35b1

File tree

6 files changed

+1707
-1774
lines changed

6 files changed

+1707
-1774
lines changed

test/integration/cra/yarn.lock

Lines changed: 501 additions & 493 deletions
Large diffs are not rendered by default.

test/integration/next/pages/_app.tsx

Lines changed: 22 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
import type { AppProps } from "next/app";
22
import { useRouter } from "next/router";
33
import { createNextDsfrIntegrationApi } from "@codegouvfr/react-dsfr/next";
4-
import { Display, headerQuickAccessDisplay } from "@codegouvfr/react-dsfr/Display";
4+
import { Display, headerFooterDisplayItem } from "@codegouvfr/react-dsfr/Display";
55
import { Header } from "@codegouvfr/react-dsfr/Header";
6+
import { Footer } from "@codegouvfr/react-dsfr/Footer";
67
import { createEmotionSsrAdvancedApproach } from "tss-react/next";
78
import { useStyles } from "tss-react/dsfr";
89
import { fr } from "@codegouvfr/react-dsfr";
@@ -42,6 +43,10 @@ const { augmentDocumentWithEmotionCache, withAppEmotionCache } = createEmotionSs
4243

4344
export { dsfrDocumentApi, augmentDocumentWithEmotionCache };
4445

46+
const brandTop= <>INTITULE<br />OFFICIEL</>;
47+
48+
const homeLinkPops= { "href": "/", "title": "Accueil - Nom de l’entité (ministère, secrétariat d‘état, gouvernement)" };
49+
4550
function App({ Component, pageProps }: AppProps) {
4651

4752
const { css } = useStyles();
@@ -51,9 +56,9 @@ function App({ Component, pageProps }: AppProps) {
5156
return (
5257
<DsfrLinkProvider>
5358
<Header
54-
brandTop={<>INTITULE<br />OFFICIEL</>}
59+
brandTop={brandTop}
5560
serviceTitle="Nom du site / service"
56-
homeLinkProps={{ "href": "/", "title": "Accueil - Nom de l’entité (ministère, secrétariat d‘état, gouvernement)" }}
61+
homeLinkProps={homeLinkPops }
5762
navItems={[
5863
{
5964
"text": "Home",
@@ -70,7 +75,7 @@ function App({ Component, pageProps }: AppProps) {
7075
"isActive": router.asPath === "/mui"
7176
}
7277
]}
73-
quickAccessItems={[headerQuickAccessDisplay]}
78+
quickAccessItems={[headerFooterDisplayItem]}
7479
/>
7580
<div className={css({
7681
"margin": "auto",
@@ -81,6 +86,19 @@ function App({ Component, pageProps }: AppProps) {
8186
})}>
8287
<Component {...pageProps} />
8388
</div>
89+
<Footer
90+
brandTop={brandTop}
91+
accessibility="fully compliant"
92+
contentDescription={`
93+
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
94+
incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam,
95+
quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
96+
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
97+
eu fugiat nulla pariatur.
98+
`}
99+
homeLinkProps={homeLinkPops}
100+
bottomItems={[headerFooterDisplayItem]}
101+
/>
84102
<Display />
85103
</DsfrLinkProvider>
86104
);

test/integration/next/pages/index.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export default function App() {
1010
return (
1111
<>
1212
<Alert
13-
isClosable={true}
13+
closable
1414
severity="success"
1515
title="Success: This is the title"
1616
description="This is the description"
@@ -45,7 +45,7 @@ function ControlledTabs() {
4545
return (
4646
<Tabs
4747
className={css({
48-
"margin": fr.spacing("3v")
48+
"margin": fr.spacing("10v"),
4949
})}
5050
selectedTabId={selectedTabId}
5151
tabs={[

0 commit comments

Comments
 (0)