From 12a03a9a72f7895d571dbaeeb245d92aa277a610 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 6 Oct 2023 17:48:03 +0200 Subject: refactor(components): merge HeadingButton and Widget components The HeadingButton component was only used inside Widget component and it is not very useful on its own so I merge the two components in a new Collapsible component. --- src/pages/blog/index.tsx | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/pages/blog/index.tsx') diff --git a/src/pages/blog/index.tsx b/src/pages/blog/index.tsx index 7eef2f0..0241a5d 100644 --- a/src/pages/blog/index.tsx +++ b/src/pages/blog/index.tsx @@ -7,6 +7,7 @@ import { useCallback } from 'react'; import { useIntl } from 'react-intl'; import { getLayout, + Heading, LinksListWidget, Notice, PageLayout, @@ -159,24 +160,30 @@ const BlogPage: NextPageWithLayout = ({ headerMeta={{ total: totalArticles }} widgets={[ + {thematicsListTitle} + + } items={getLinksListItems( thematicsList.map((thematic) => getPageLinkFromRawData(thematic, 'thematic') ) )} - title={thematicsListTitle} - level={2} + // eslint-disable-next-line react/jsx-no-literals -- Key allowed + key="thematics-list" />, + {topicsListTitle} + + } items={getLinksListItems( topicsList.map((topic) => getPageLinkFromRawData(topic, 'topic')) )} - title={topicsListTitle} - level={2} + // eslint-disable-next-line react/jsx-no-literals -- Key allowed + key="topics-list" />, ]} > -- cgit v1.2.3