Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ajout de plausible #224

Merged
merged 2 commits into from
Nov 8, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions ui/app/(documentation)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import PlausibleProvider from "next-plausible";
import Container from "#/app/components/Container";
import DefaultRootLayout from "#/app/components/RootLayout";

Expand All @@ -6,9 +7,9 @@ export default function RootLayout({ children }: { children: JSX.Element }) {

return (
<DefaultRootLayout title={"Exposition - Documentation"}>
<>
<PlausibleProvider domain={process.env.DOCUMENTATION_SITE_HOST || ""}>
<Container maxWidth={"xl"}>{children}</Container>
</>
</PlausibleProvider>
</DefaultRootLayout>
);
}
57 changes: 30 additions & 27 deletions ui/app/(statistiques)/layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { NextAppDirEmotionCacheProvider } from "tss-react/next";
import PlausibleProvider from "next-plausible";
import { DsfrHead } from "@codegouvfr/react-dsfr/next-appdir/DsfrHead";
import { DsfrProvider } from "@codegouvfr/react-dsfr/next-appdir/DsfrProvider";
import { getHtmlAttributes } from "@codegouvfr/react-dsfr/next-appdir/getHtmlAttributes";
Expand All @@ -16,35 +17,37 @@ export function Layout({ children }: { children: JSX.Element }) {
<DsfrProvider>
<NextAppDirEmotionCacheProvider options={{ key: "css" }}>
<MuiDsfrThemeProvider>
<Header
brandTop={<>Exposition - Statistique</>}
serviceTitle="Exposition - Statistique"
homeLinkProps={{
href: "/",
title: "Exposition - Statistique",
}}
quickAccessItems={[]}
/>
<div
style={{
flex: 1,
width: "100%",
margin: "auto",
maxWidth: 1200,
...fr.spacing("padding", {
topBottom: "10v",
}),
}}
>
<Container variant="content" maxWidth={false}>
<Typograhpy variant="h3">{"Statistiques du projet Exposition d'InserJeunes"}</Typograhpy>
<Typograhpy variant="body1">{""}</Typograhpy>
<PlausibleProvider domain={process.env.STATISTIQUES_SITE_HOST || ""}>
<Header
brandTop={<>Exposition - Statistique</>}
serviceTitle="Exposition - Statistique"
homeLinkProps={{
href: "/",
title: "Exposition - Statistique",
}}
quickAccessItems={[]}
/>
<div
style={{
flex: 1,
width: "100%",
margin: "auto",
maxWidth: 1200,
...fr.spacing("padding", {
topBottom: "10v",
}),
}}
>
<Container variant="content" maxWidth={false}>
<Typograhpy variant="h3">{"Statistiques du projet Exposition d'InserJeunes"}</Typograhpy>
<Typograhpy variant="body1">{""}</Typograhpy>

<Container variant="subContent" maxWidth={false}>
{children}
<Container variant="subContent" maxWidth={false}>
{children}
</Container>
</Container>
</Container>
</div>
</div>
</PlausibleProvider>
</MuiDsfrThemeProvider>
</NextAppDirEmotionCacheProvider>
</DsfrProvider>
Expand Down
1 change: 1 addition & 0 deletions ui/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
"material-react-table": "^1.14.0",
"moment": "^2.29.4",
"next": "13.4.7",
"next-plausible": "^3.11.3",
"notion-client": "^6.16.0",
"react": "18.2.0",
"react-dom": "^18.2.0",
Expand Down
5 changes: 5 additions & 0 deletions ui/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4355,6 +4355,11 @@ natural-compare@^1.4.0:
resolved "https://registry.yarnpkg.com/natural-compare/-/natural-compare-1.4.0.tgz#4abebfeed7541f2c27acfb29bdbbd15c8d5ba4f7"
integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw==

next-plausible@^3.11.3:
version "3.11.3"
resolved "https://registry.yarnpkg.com/next-plausible/-/next-plausible-3.11.3.tgz#387d2039b66f17f8f704027b2572a0e84e58eee7"
integrity sha512-2dpG58ryxdsr4ZI8whWQpGv0T6foRDPGiehcICpDhYfmMJmluewswQgfDA8Z37RFMXAY+6SHOPS7Xi+9ewNi2Q==

[email protected]:
version "13.4.7"
resolved "https://registry.yarnpkg.com/next/-/next-13.4.7.tgz#2ab20e6fada2e25cb81bd17f68956705ffd9824e"
Expand Down
Loading