diff options
| author | Armand Philippot <git@armandphilippot.com> | 2021-12-21 15:20:17 +0100 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2021-12-21 15:20:17 +0100 |
| commit | 926e1df1e9a7de29134293fe2306c9d9ecb594a6 (patch) | |
| tree | d83550ce445525a3993d2f345cb301be5e7403b3 /src/pages/mentions-legales.tsx | |
| parent | ae17973618c5ad5500ae69738da222187a09b019 (diff) | |
chore: add a table of contents
Diffstat (limited to 'src/pages/mentions-legales.tsx')
| -rw-r--r-- | src/pages/mentions-legales.tsx | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/src/pages/mentions-legales.tsx b/src/pages/mentions-legales.tsx index 6155132..41e9a0c 100644 --- a/src/pages/mentions-legales.tsx +++ b/src/pages/mentions-legales.tsx @@ -1,4 +1,5 @@ import { getLayout } from '@components/Layouts/Layout'; +import ToC from '@components/ToC/ToC'; import { seo } from '@config/seo'; import { getPageByUri } from '@services/graphql/queries'; import { NextPageWithLayout } from '@ts/types/app'; @@ -17,9 +18,16 @@ const LegalNotice: NextPageWithLayout<PageProps> = ({ page }) => { <article> <header> <h1>{page.title}</h1> - <div dangerouslySetInnerHTML={{ __html: page.intro }}></div> + {page.content && ( + <div dangerouslySetInnerHTML={{ __html: page.intro }}></div> + )} </header> - <div dangerouslySetInnerHTML={{ __html: page.content }}></div> + <ToC /> + <div + dangerouslySetInnerHTML={{ + __html: page.content ? page.content : page.intro, + }} + ></div> </article> </> ); |
