diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/pages/thematique/[slug].tsx | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/src/pages/thematique/[slug].tsx b/src/pages/thematique/[slug].tsx index 23e6a8b..9586f77 100644 --- a/src/pages/thematique/[slug].tsx +++ b/src/pages/thematique/[slug].tsx @@ -218,14 +218,15 @@ export const getStaticProps: GetStaticProps<ThematicPageProps> = async ({    const allThematics = allThematicsEdges.edges.map((edge) =>      getPageLinkFromRawData(edge.node)    ); +  const allThematicsLinks = allThematics.filter( +    (thematic) => thematic.slug !== (params!.slug as ThematicParams['slug']) +  );    const translation = await loadTranslation(locale);    return {      props: {        currentThematic: JSON.parse(JSON.stringify(currentThematic)), -      thematics: allThematics.filter( -        (thematic) => thematic.slug !== (params!.slug as ThematicParams['slug']) -      ), +      thematics: JSON.parse(JSON.stringify(allThematicsLinks)),        translation,      },    }; | 
