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/sujet | |
| parent | 5ebd7c14f7303a0feb8ec1d902ecd0e287d929c3 (diff) | |
fix: ensure all topics/thematics have the base url
Diffstat (limited to 'src/pages/sujet')
| -rw-r--r-- | src/pages/sujet/[slug].tsx | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/pages/sujet/[slug].tsx b/src/pages/sujet/[slug].tsx index 838f009..5c86720 100644 --- a/src/pages/sujet/[slug].tsx +++ b/src/pages/sujet/[slug].tsx @@ -138,13 +138,13 @@ const TopicPage: NextPageWithLayout<TopicPageProps> = ({ ? [ <LinksListWidget key="related-thematics" - items={getLinksListItems(thematics, 'thematic')} + items={getLinksListItems(thematics)} title={thematicsListTitle} level={2} />, <LinksListWidget key="topics" - items={getLinksListItems(topics, 'topic')} + items={getLinksListItems(topics)} title={topicsListTitle} level={2} />, @@ -198,10 +198,10 @@ export const getStaticProps: GetStaticProps<TopicPageProps> = async ({ first: totalTopics, }); const allTopics = allTopicsEdges.edges.map((edge) => - getPageLinkFromRawData(edge.node) + getPageLinkFromRawData(edge.node, 'topic') ); const topicsLinks = allTopics.filter( - (topic) => topic.slug !== (params!.slug as TopicParams['slug']) + (topic) => topic.url !== `/sujet/${params!.slug as TopicParams['slug']}` ); const translation = await loadTranslation(locale); |
