From 7e16f500cb7bc0cfd8bafbf6bb1555704f771231 Mon Sep 17 00:00:00 2001 From: Armand Philippot 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/ReadingTime/ReadingTime.tsx | 59 ---------------------- 1 file changed, 59 deletions(-) delete mode 100644 src/components/MetaItems/ReadingTime/ReadingTime.tsx (limited to 'src/components/MetaItems/ReadingTime/ReadingTime.tsx') diff --git a/src/components/MetaItems/ReadingTime/ReadingTime.tsx b/src/components/MetaItems/ReadingTime/ReadingTime.tsx deleted file mode 100644 index 79d6f3c..0000000 --- a/src/components/MetaItems/ReadingTime/ReadingTime.tsx +++ /dev/null @@ -1,59 +0,0 @@ -import { MetaKind } from '@ts/types/app'; -import { useRouter } from 'next/router'; -import { useIntl } from 'react-intl'; -import { MetaItem } from '..'; - -const ReadingTime = ({ - time, - words, - kind, -}: { - time: number; - words: number; - kind: MetaKind; -}) => { - const intl = useIntl(); - const { locale } = useRouter(); - - const getEstimation = () => { - if (time < 0) { - return intl.formatMessage({ - defaultMessage: 'less than 1 minute', - description: 'ReadingTime: Reading time value', - id: 'ySsWZl', - }); - } - - return intl.formatMessage( - { - defaultMessage: - '{time, plural, =0 {# minutes} one {# minute} other {# minutes}}', - description: 'ReadingTime: reading time value', - id: 'wdqOpf', - }, - { time } - ); - }; - - return ( - - ); -}; - -export default ReadingTime; -- cgit v1.2.3