aboutsummaryrefslogtreecommitdiffstats
path: root/src/pages/thematique
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2023-11-14 15:11:22 +0100
committerArmand Philippot <git@armandphilippot.com>2023-11-14 19:06:42 +0100
commita3a4c50f26b8750ae1c87f1f1103b84b7d2e6315 (patch)
treeae286c7c6b3ab4f556f20adf5e42b24641351296 /src/pages/thematique
parent50f1c501a87ef5f5650750dbeca797e833ec7c3a (diff)
refactor(components): replace LinksListWidget with LinksWidget
* avoid List component repeat * rewrite tests and CSS * add an id to LinksWidgetItemData (previously LinksListItems) type because the label could be duplicated
Diffstat (limited to 'src/pages/thematique')
-rw-r--r--src/pages/thematique/[slug].tsx12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/pages/thematique/[slug].tsx b/src/pages/thematique/[slug].tsx
index 61d105e..20c1ee8 100644
--- a/src/pages/thematique/[slug].tsx
+++ b/src/pages/thematique/[slug].tsx
@@ -8,7 +8,7 @@ import { useIntl } from 'react-intl';
import {
getLayout,
Heading,
- LinksListWidget,
+ LinksWidget,
type MetaItemData,
PageLayout,
PostsList,
@@ -24,7 +24,7 @@ import styles from '../../styles/pages/blog.module.scss';
import type { NextPageWithLayout, PageLink, Thematic } from '../../types';
import { ROUTES } from '../../utils/constants';
import {
- getLinksListItems,
+ getLinksItemData,
getPageLinkFromRawData,
getPostsWithUrl,
getSchemaJson,
@@ -158,23 +158,23 @@ const ThematicPage: NextPageWithLayout<ThematicPageProps> = ({
widgets={
topics
? [
- <LinksListWidget
+ <LinksWidget
heading={
<Heading isFake level={3}>
{thematicsListTitle}
</Heading>
}
- items={getLinksListItems(thematics)}
+ items={getLinksItemData(thematics)}
// eslint-disable-next-line react/jsx-no-literals -- Key allowed
key="thematics"
/>,
- <LinksListWidget
+ <LinksWidget
heading={
<Heading isFake level={3}>
{topicsListTitle}
</Heading>
}
- items={getLinksListItems(topics)}
+ items={getLinksItemData(topics)}
// eslint-disable-next-line react/jsx-no-literals -- Key allowed
key="related-topics"
/>,