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. --- src/components/PostMeta/PostMeta.tsx | 67 ------------------------------------ 1 file changed, 67 deletions(-) delete mode 100644 src/components/PostMeta/PostMeta.tsx (limited to 'src/components/PostMeta/PostMeta.tsx') diff --git a/src/components/PostMeta/PostMeta.tsx b/src/components/PostMeta/PostMeta.tsx deleted file mode 100644 index 7fba0be..0000000 --- a/src/components/PostMeta/PostMeta.tsx +++ /dev/null @@ -1,67 +0,0 @@ -import { - Author, - CommentsCount, - Dates, - PostsCount, - ReadingTime, - Thematics, - Topics, - Website, -} from '@components/MetaItems'; -import { MetaKind } from '@ts/types/app'; -import { ArticleMeta } from '@ts/types/articles'; -import { useRouter } from 'next/router'; -import styles from './PostMeta.module.scss'; - -const PostMeta = ({ - meta, - kind = 'list', -}: { - meta: ArticleMeta; - kind?: MetaKind; -}) => { - const { - author, - commentCount, - dates, - readingTime, - results, - thematics, - topics, - website, - wordsCount, - } = meta; - const { asPath } = useRouter(); - const isThematic = () => asPath.includes('/thematique/'); - - const wrapperClass = styles[`wrapper--${kind}`]; - - return ( -
- {author && } - {dates && ( - - )} - {readingTime !== undefined && wordsCount !== undefined && ( - - )} - {results !== undefined && } - {!isThematic() && thematics && thematics.length > 0 && ( - - )} - {isThematic() && topics && topics.length > 0 && ( - - )} - {website && } - {commentCount !== undefined && ( - - )} -
- ); -}; - -export default PostMeta; -- cgit v1.2.3