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/404.tsx | 23 +++++++++++++++-------- 1 file changed, 15 insertions(+), 8 deletions(-) (limited to 'src/pages/404.tsx') diff --git a/src/pages/404.tsx b/src/pages/404.tsx index af95a36..ae6eac5 100644 --- a/src/pages/404.tsx +++ b/src/pages/404.tsx @@ -4,6 +4,7 @@ import type { ReactNode } from 'react'; import { useIntl } from 'react-intl'; import { getLayout, + Heading, Link, LinksListWidget, PageLayout, @@ -98,24 +99,30 @@ const Error404Page: NextPageWithLayout = ({ breadcrumbSchema={breadcrumbSchema} 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