Skip to content

Commit 784cfcd

Browse files
committed
Update layouts
1 parent 91d2d62 commit 784cfcd

File tree

4 files changed

+25
-26
lines changed

4 files changed

+25
-26
lines changed

test/integration/cra/src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ function Root() {
5555
}
5656
]} />
5757
<div style={{
58-
"height": "100vh",
58+
"minHeight": "100vh",
5959
"display": "flex",
6060
"flexDirection": "column",
6161
}}>

test/integration/next-appdir/app/layout.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default function RootLayout({ children }: { children: JSX.Element; }) {
5555
</head>
5656
<body
5757
style={{
58-
"height": "100vh",
58+
"minHeight": "100vh",
5959
"display": "flex",
6060
"flexDirection": "column"
6161
}}

test/integration/next-pagesdir/pages/_app.tsx

Lines changed: 16 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ declare module "@codegouvfr/react-dsfr/next-pagesdir" {
1818
}
1919

2020
declare module "@codegouvfr/react-dsfr/gdpr" {
21-
interface RegisterGdprServices {
21+
interface RegisterGdprServices {
2222
matomo: never;
2323
}
2424
}
@@ -49,10 +49,6 @@ const { augmentDocumentWithEmotionCache, withAppEmotionCache } = createEmotionSs
4949

5050
export { dsfrDocumentApi, augmentDocumentWithEmotionCache };
5151

52-
const brandTop = <>INTITULE<br />OFFICIEL</>;
53-
54-
const homeLinkProps = { "href": "/", "title": "Accueil - Nom de l’entité (ministère, secrétariat d‘état, gouvernement)" };
55-
5652
function App({ Component, pageProps }: AppProps) {
5753

5854
const { css } = useStyles();
@@ -61,24 +57,29 @@ function App({ Component, pageProps }: AppProps) {
6157

6258
return (
6359
<>
64-
<ConsentBanner gdprLinkProps={{href: "/mui"}} siteName='Next Test App' services={[
65-
{
66-
name: "matomo",
67-
title: "Matomo",
68-
description: "User tracking",
69-
}
70-
]} />
60+
<ConsentBanner gdprLinkProps={{ href: "/mui" }} siteName='Next Test App' services={[
61+
{
62+
name: "matomo",
63+
title: "Matomo",
64+
description: "User tracking",
65+
}
66+
]} />
7167
<div
7268
style={{
73-
"height": "100vh",
69+
"minHeight": "100vh",
7470
"display": "flex",
7571
"flexDirection": "column"
7672
}}
7773
>
7874
<Header
79-
brandTop={brandTop}
75+
brandTop={
76+
<>INTITULE<br />OFFICIEL</>
77+
}
8078
serviceTitle="Nom du site / service"
81-
homeLinkProps={homeLinkProps}
79+
homeLinkProps={{
80+
"href": "/",
81+
"title": "Accueil - Nom de l’entité (ministère, secrétariat d‘état, gouvernement)"
82+
}}
8283
navigation={[
8384
{
8485
"text": "Home",
@@ -123,7 +124,6 @@ function App({ Component, pageProps }: AppProps) {
123124
<Component {...pageProps} />
124125
</div>
125126
<Footer
126-
brandTop={brandTop}
127127
accessibility="fully compliant"
128128
contentDescription={`
129129
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
@@ -132,7 +132,6 @@ function App({ Component, pageProps }: AppProps) {
132132
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
133133
eu fugiat nulla pariatur.
134134
`}
135-
homeLinkProps={homeLinkProps}
136135
bottomItems={[headerFooterDisplayItem]}
137136
/>
138137
</div>

test/integration/vite/src/main.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,8 @@ ReactDOM.createRoot(document.getElementById("root") as HTMLElement).render(
4444
</React.StrictMode>
4545
);
4646

47-
const brandTop = <>INTITULE<br />OFFICIEL</>;
4847

49-
const homeLinkProps = { "to": "/", "title": "Accueil - Nom de l’entité (ministère, secrétariat d‘état, gouvernement)" };
48+
5049

5150
function Root() {
5251

@@ -61,11 +60,14 @@ function Root() {
6160
description: "User tracking",
6261
}
6362
]} />
64-
<div style={{ "height": "100vh", "display": "flex", "flexDirection": "column" }}>
63+
<div style={{ "minHeight": "100vh", "display": "flex", "flexDirection": "column" }}>
6564
<Header
66-
brandTop={brandTop}
65+
brandTop={<>INTITULE<br />OFFICIEL</>}
6766
serviceTitle="Nom du site / service"
68-
homeLinkProps={homeLinkProps}
67+
homeLinkProps={{
68+
"to": "/",
69+
"title": "Accueil - Nom de l’entité (ministère, secrétariat d‘état, gouvernement)"
70+
}}
6971
quickAccessItems={[
7072
headerFooterDisplayItem,
7173
{
@@ -113,7 +115,6 @@ function Root() {
113115
</Routes>
114116
</div>
115117
<Footer
116-
brandTop={brandTop}
117118
accessibility="fully compliant"
118119
contentDescription={`
119120
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
@@ -122,7 +123,6 @@ function Root() {
122123
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore
123124
eu fugiat nulla pariatur.
124125
`}
125-
homeLinkProps={homeLinkProps}
126126
bottomItems={[headerFooterDisplayItem]}
127127
/>
128128
</div>

0 commit comments

Comments
 (0)