summaryrefslogtreecommitdiffstats
path: root/src/components/templates
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2022-05-18 22:40:59 +0200
committerArmand Philippot <git@armandphilippot.com>2022-05-18 22:40:59 +0200
commit584bd42f871d2e1618ca414749f09c38f0143a44 (patch)
tree45c821eec2ad9c77d5bccf83057cfc0a7e22ba09 /src/components/templates
parentb214baab3e17d92f784b4f782863deafc5558ee4 (diff)
chore: handle settings change
Diffstat (limited to 'src/components/templates')
-rw-r--r--src/components/templates/layout/layout.tsx10
-rw-r--r--src/components/templates/page/page-layout.tsx3
2 files changed, 9 insertions, 4 deletions
diff --git a/src/components/templates/layout/layout.tsx b/src/components/templates/layout/layout.tsx
index 559eaed..8f0d4e7 100644
--- a/src/components/templates/layout/layout.tsx
+++ b/src/components/templates/layout/layout.tsx
@@ -193,14 +193,16 @@ const Layout: FC<LayoutProps> = ({
{skipToContent}
</ButtonLink>
<Header
- title={name}
+ ackeeStorageKey="ackee-tracking"
baseline={baseline}
- photo={picture}
+ className={styles.header}
+ isHome={isHome}
+ motionStorageKey="reduced-motion"
nav={mainNav}
+ photo={picture}
searchPage="/recherche"
- isHome={isHome}
+ title={name}
withLink={true}
- className={styles.header}
/>
<Main id="main" className={styles.main}>
<article
diff --git a/src/components/templates/page/page-layout.tsx b/src/components/templates/page/page-layout.tsx
index d171944..54b8d6e 100644
--- a/src/components/templates/page/page-layout.tsx
+++ b/src/components/templates/page/page-layout.tsx
@@ -20,6 +20,7 @@ import CommentsList, {
import TableOfContents from '@components/organisms/widgets/table-of-contents';
import { type SendCommentVars } from '@services/graphql/api';
import { sendComment } from '@services/graphql/comments';
+import useCodeBlocksTheme from '@utils/hooks/use-code-blocks-theme';
import useIsMounted from '@utils/hooks/use-is-mounted';
import Script from 'next/script';
import { FC, HTMLAttributes, ReactNode, useRef, useState } from 'react';
@@ -183,6 +184,8 @@ const PageLayout: FC<PageLayoutProps> = ({
return Object.values(meta).every((value) => value === null);
};
+ useCodeBlocksTheme(bodyRef);
+
return (
<>
<Script