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.
---
 .../MetaItems/CommentsCount/CommentsCount.tsx      | 43 ----------------------
 1 file changed, 43 deletions(-)
 delete mode 100644 src/components/MetaItems/CommentsCount/CommentsCount.tsx

(limited to 'src/components/MetaItems/CommentsCount/CommentsCount.tsx')

diff --git a/src/components/MetaItems/CommentsCount/CommentsCount.tsx b/src/components/MetaItems/CommentsCount/CommentsCount.tsx
deleted file mode 100644
index 04cffa6..0000000
--- a/src/components/MetaItems/CommentsCount/CommentsCount.tsx
+++ /dev/null
@@ -1,43 +0,0 @@
-import { MetaKind } from '@ts/types/app';
-import { useRouter } from 'next/router';
-import { useIntl } from 'react-intl';
-import { MetaItem } from '..';
-
-const CommentsCount = ({ total, kind }: { total: number; kind: MetaKind }) => {
-  const intl = useIntl();
-  const { asPath } = useRouter();
-
-  const isArticle = () => asPath.includes('/article/');
-
-  const getCommentsCount = () => {
-    return intl.formatMessage(
-      {
-        defaultMessage:
-          '{total, plural, =0 {No comments} one {# comment} other {# comments}}',
-        description: 'CommentsCount: comment count value',
-        id: 'lKGNKx',
-      },
-      { total }
-    );
-  };
-
-  return (
-    <MetaItem
-      title={intl.formatMessage({
-        defaultMessage: 'Comments:',
-        description: 'CommentsCount: comment count meta label',
-        id: '6BRtAu',
-      })}
-      value={
-        isArticle() ? (
-          <a href="#comments">{getCommentsCount()}</a>
-        ) : (
-          getCommentsCount()
-        )
-      }
-      kind={kind}
-    />
-  );
-};
-
-export default CommentsCount;
-- 
cgit v1.2.3

