From 0ef4f77954ba54b52b96c70a8bffe96804bd222d Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Thu, 16 Dec 2021 18:22:08 +0100 Subject: chore: display featuredImage and meta on posts list --- src/services/graphql/post.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/services/graphql/post.ts') diff --git a/src/services/graphql/post.ts b/src/services/graphql/post.ts index c7144fc..2ce918b 100644 --- a/src/services/graphql/post.ts +++ b/src/services/graphql/post.ts @@ -108,7 +108,7 @@ export const getPostBySlug: GetPostByReturn = async (slug: string) => { const content = rawPost.postBy.contentParts.afterMore; const featuredImage = rawPost.postBy.featuredImage ? rawPost.postBy.featuredImage.node - : {}; + : null; const date = { publication: rawPost.postBy.date, update: rawPost.postBy.modified, @@ -117,8 +117,8 @@ export const getPostBySlug: GetPostByReturn = async (slug: string) => { const subjects = rawPost.postBy.acfPosts.postsInSubject ? rawPost.postBy.acfPosts.postsInSubject : []; - const thematics = rawPost.postBy.acfPosts.postsInThematics - ? rawPost.postBy.acfPosts.postsInThematics + const thematics = rawPost.postBy.acfPosts.postsInThematic + ? rawPost.postBy.acfPosts.postsInThematic : []; const formattedPost: Article = { -- cgit v1.2.3