diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-05-23 19:32:42 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-05-23 20:53:58 +0200 |
| commit | c51b5d9a5f217f8aa59c4bdcb04eb3c87f5129b3 (patch) | |
| tree | a4ce7f77c2b1742119eebf818d9b97db7ed1e310 /src/pages/thematique | |
| parent | 5ebd7c14f7303a0feb8ec1d902ecd0e287d929c3 (diff) | |
fix: ensure all topics/thematics have the base url
Diffstat (limited to 'src/pages/thematique')
| -rw-r--r-- | src/pages/thematique/[slug].tsx | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/pages/thematique/[slug].tsx b/src/pages/thematique/[slug].tsx index 84ab134..0519731 100644 --- a/src/pages/thematique/[slug].tsx +++ b/src/pages/thematique/[slug].tsx @@ -118,13 +118,13 @@ const ThematicPage: NextPageWithLayout<ThematicPageProps> = ({ ? [ <LinksListWidget key="thematics" - items={getLinksListItems(thematics, 'thematic')} + items={getLinksListItems(thematics)} title={thematicsListTitle} level={2} />, <LinksListWidget key="related-topics" - items={getLinksListItems(topics, 'topic')} + items={getLinksListItems(topics)} title={topicsListTitle} level={2} />, @@ -178,10 +178,11 @@ export const getStaticProps: GetStaticProps<ThematicPageProps> = async ({ first: totalThematics, }); const allThematics = allThematicsEdges.edges.map((edge) => - getPageLinkFromRawData(edge.node) + getPageLinkFromRawData(edge.node, 'thematic') ); const allThematicsLinks = allThematics.filter( - (thematic) => thematic.slug !== (params!.slug as ThematicParams['slug']) + (thematic) => + thematic.url !== `/thematique/${params!.slug as ThematicParams['slug']}` ); const translation = await loadTranslation(locale); |
