From a3eb518dcccaebd0f48c708c189ad2fcb07f0f73 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Sun, 21 Aug 2022 13:50:18 +0200 Subject: fix(comments): load all comments on a post Previously, only the first 10 comments was loaded. So I update the fetching method to retrieve all the comments on a post. Also, I choose to order comments on client side because of a bug with WPGraphQL. Finally, I renamed the Comment type to SingleComment to avoid conflict with existing types. --- src/ts/types/app.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/ts/types/app.ts') diff --git a/src/ts/types/app.ts b/src/ts/types/app.ts index 7bf1541..c11c31b 100644 --- a/src/ts/types/app.ts +++ b/src/ts/types/app.ts @@ -39,13 +39,13 @@ export type CommentMeta = { date: string; }; -export type Comment = { +export type SingleComment = { approved: boolean; content: string; id: number; meta: CommentMeta; parentId?: number; - replies: Comment[]; + replies: SingleComment[]; }; export type Dates = { -- cgit v1.2.3