From 8bd9784acdee6871ad70e86d0d7120299bf76969 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Tue, 1 Mar 2022 22:05:08 +0100
Subject: refactor: split posts meta into smaller components

---
 src/components/PostHeader/PostHeader.tsx | 16 ++--------------
 1 file changed, 2 insertions(+), 14 deletions(-)

(limited to 'src/components/PostHeader/PostHeader.tsx')

diff --git a/src/components/PostHeader/PostHeader.tsx b/src/components/PostHeader/PostHeader.tsx
index f070583..c0a6b68 100644
--- a/src/components/PostHeader/PostHeader.tsx
+++ b/src/components/PostHeader/PostHeader.tsx
@@ -16,19 +16,6 @@ const PostHeader = ({
   meta?: ArticleMeta;
   title: string;
 }) => {
-  const hasMeta = () => {
-    return (
-      meta?.author ||
-      meta?.commentCount ||
-      meta?.dates ||
-      meta?.readingTime ||
-      meta?.results ||
-      meta?.thematics ||
-      meta?.website ||
-      meta?.wordsCount
-    );
-  };
-
   const getIntro = () => {
     if (React.isValidElement(intro)) {
       const Intro = () => intro;
@@ -38,6 +25,7 @@ const PostHeader = ({
         </div>
       );
     }
+
     return (
       intro && (
         <div
@@ -59,7 +47,7 @@ const PostHeader = ({
           )}
           {title}
         </h1>
-        {meta && hasMeta() && <PostMeta mode="single" meta={meta} />}
+        {meta && <PostMeta kind="article" meta={meta} />}
         {getIntro()}
       </div>
     </header>
-- 
cgit v1.2.3

