From 7e16f500cb7bc0cfd8bafbf6bb1555704f771231 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Fri, 29 Apr 2022 12:13:34 +0200
Subject: 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.
---
 .../Widgets/RelatedTopics/RelatedTopics.tsx        | 41 ----------------------
 1 file changed, 41 deletions(-)
 delete mode 100644 src/components/Widgets/RelatedTopics/RelatedTopics.tsx

(limited to 'src/components/Widgets/RelatedTopics/RelatedTopics.tsx')

diff --git a/src/components/Widgets/RelatedTopics/RelatedTopics.tsx b/src/components/Widgets/RelatedTopics/RelatedTopics.tsx
deleted file mode 100644
index 992173d..0000000
--- a/src/components/Widgets/RelatedTopics/RelatedTopics.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-import { ExpandableWidget, List } from '@components/WidgetParts';
-import { TopicPreview } from '@ts/types/taxonomies';
-import Link from 'next/link';
-import { useIntl } from 'react-intl';
-
-const RelatedTopics = ({ topics }: { topics: TopicPreview[] }) => {
-  const intl = useIntl();
-  const sortedTopics = [...topics].sort((a, b) =>
-    a.title.localeCompare(b.title)
-  );
-
-  const topicsList = sortedTopics.map((topic) => {
-    return (
-      <li key={topic.databaseId}>
-        <Link href={`/sujet/${topic.slug}`}>
-          <a>{topic.title}</a>
-        </Link>
-      </li>
-    );
-  });
-
-  return (
-    <ExpandableWidget
-      expand={true}
-      title={intl.formatMessage(
-        {
-          defaultMessage:
-            '{topicsCount, plural, =0 {Related topics} one {Related topic} other {Related topics}}',
-          description: 'RelatedTopics: widget title',
-          id: 'w/lPUh',
-        },
-        { topicsCount: topicsList.length }
-      )}
-      withBorders={true}
-    >
-      <List items={topicsList} />
-    </ExpandableWidget>
-  );
-};
-
-export default RelatedTopics;
-- 
cgit v1.2.3

