diff options
| author | Armand Philippot <git@armandphilippot.com> | 2022-04-29 12:13:34 +0200 |
|---|---|---|
| committer | Armand Philippot <git@armandphilippot.com> | 2022-04-29 18:30:05 +0200 |
| commit | 7e16f500cb7bc0cfd8bafbf6bb1555704f771231 (patch) | |
| tree | bfc2b4a475cb06a787e2c4bdf284165644e82952 /src/components/Widgets/RelatedThematics/RelatedThematics.tsx | |
| parent | 5324664e87bedfaa01ba62c0c847ef5b861e69b3 (diff) | |
chore: remove old pages, components, helpers and types
Since I'm using new components, I will also rewrite the GraphQL queries
so it is easier to start from scratch.
Diffstat (limited to 'src/components/Widgets/RelatedThematics/RelatedThematics.tsx')
| -rw-r--r-- | src/components/Widgets/RelatedThematics/RelatedThematics.tsx | 41 |
1 files changed, 0 insertions, 41 deletions
diff --git a/src/components/Widgets/RelatedThematics/RelatedThematics.tsx b/src/components/Widgets/RelatedThematics/RelatedThematics.tsx deleted file mode 100644 index a66de82..0000000 --- a/src/components/Widgets/RelatedThematics/RelatedThematics.tsx +++ /dev/null @@ -1,41 +0,0 @@ -import { ExpandableWidget, List } from '@components/WidgetParts'; -import { ThematicPreview } from '@ts/types/taxonomies'; -import Link from 'next/link'; -import { useIntl } from 'react-intl'; - -const RelatedThematics = ({ thematics }: { thematics: ThematicPreview[] }) => { - const intl = useIntl(); - const sortedThematics = [...thematics].sort((a, b) => - a.title.localeCompare(b.title) - ); - - const thematicsList = sortedThematics.map((thematic) => { - return ( - <li key={thematic.databaseId}> - <Link href={`/thematique/${thematic.slug}`}> - <a>{thematic.title}</a> - </Link> - </li> - ); - }); - - return ( - <ExpandableWidget - expand={true} - title={intl.formatMessage( - { - defaultMessage: - '{thematicsCount, plural, =0 {Related thematics} one {Related thematic} other {Related thematics}}', - description: 'RelatedThematics: widget title', - id: 'qXQETZ', - }, - { thematicsCount: thematics.length } - )} - withBorders={true} - > - <List items={thematicsList} /> - </ExpandableWidget> - ); -}; - -export default RelatedThematics; |
