aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/thematique
diff options
context:
space:
mode:
Diffstat (limited to 'src/pages/thematique')
-rw-r--r--src/pages/thematique/[slug].tsx11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/pages/thematique/[slug].tsx b/src/pages/thematique/[slug].tsx
index 56b956f..ef21fb4 100644
--- a/src/pages/thematique/[slug].tsx
+++ b/src/pages/thematique/[slug].tsx
@@ -1,6 +1,7 @@
/* eslint-disable max-statements */
import type { ParsedUrlQuery } from 'querystring';
import type { GetStaticPaths, GetStaticProps } from 'next';
+import dynamic from 'next/dynamic';
import Head from 'next/head';
import { useRouter } from 'next/router';
import { useIntl } from 'react-intl';
@@ -14,7 +15,6 @@ import {
PageSidebar,
PageBody,
LoadingPage,
- TocWidget,
Spinner,
} from '../../components';
import {
@@ -48,6 +48,13 @@ import {
useThematicsList,
} from '../../utils/hooks';
+const Toc = dynamic(
+ async () => import('../../components').then((mod) => mod.TocWidget),
+ {
+ ssr: false,
+ }
+);
+
export type ThematicPageProps = {
data: {
currentThematic: WPThematic;
@@ -152,7 +159,7 @@ const ThematicPage: NextPageWithLayout<ThematicPageProps> = ({ data }) => {
}}
/>
<PageSidebar>
- <TocWidget
+ <Toc
heading={<Heading level={2}>{messages.widgets.tocTitle}</Heading>}
tree={[
...tree,