From fa6adedc42e9c6ec39cc30df16b54900c220b094 Mon Sep 17 00:00:00 2001
From: Armand Philippot <git@armandphilippot.com>
Date: Mon, 20 Dec 2021 00:15:20 +0100
Subject: refactor: rewrite types and services

I was repeating myself a lot in services. So I rewrited the different
functions to improve readability and I extracted some formatting
functions to put them in utils. I also rewrited/reorganized some types
to keep consistent names.
---
 src/components/PostPreview/PostPreview.tsx | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

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

diff --git a/src/components/PostPreview/PostPreview.tsx b/src/components/PostPreview/PostPreview.tsx
index 95aca97..f5c6d9b 100644
--- a/src/components/PostPreview/PostPreview.tsx
+++ b/src/components/PostPreview/PostPreview.tsx
@@ -38,7 +38,7 @@ const PostPreview = ({
       </header>
       <div
         className={styles.body}
-        dangerouslySetInnerHTML={{ __html: post.content }}
+        dangerouslySetInnerHTML={{ __html: post.intro }}
       ></div>
       <footer className={styles.footer}>
         <Link href={`/article/${post.slug}`}>
@@ -54,8 +54,8 @@ const PostPreview = ({
       </footer>
       <PostMeta
         commentCount={post.commentCount}
-        publicationDate={post.date.publication}
-        updateDate={post.date.update}
+        publicationDate={post.dates.publication}
+        updateDate={post.dates.update}
         thematics={post.thematics}
       />
     </article>
-- 
cgit v1.2.3

