From 637350e4d152de1346857d645bda8443900ec6f4 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Mon, 14 Feb 2022 13:57:06 +0100 Subject: fix: update comments list when a new comment is send The comments list was static before. If an user posted a comment, even after it was approved, the comments list was keeping the old state. --- src/ts/types/articles.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/ts/types/articles.ts') diff --git a/src/ts/types/articles.ts b/src/ts/types/articles.ts index 75e5a1a..ea90207 100644 --- a/src/ts/types/articles.ts +++ b/src/ts/types/articles.ts @@ -35,7 +35,6 @@ export type ArticleMeta = { export type Article = { author: ArticleAuthor; commentCount: number | null; - comments: Comment[]; content: string; databaseId: number; dates: Dates; @@ -55,7 +54,6 @@ export type RawArticle = Pick< > & { acfPosts: RawACFPosts; author: { node: ArticleAuthor }; - comments: CommentsNode; contentParts: ContentParts; date: string; featuredImage: RawCover; @@ -91,6 +89,7 @@ export type PostBy = { }; export type ArticleProps = { + comments: Comment[]; post: Article; }; -- cgit v1.2.3