From abf6e96383035f99addab804e8c3dd1a74d36375 Mon Sep 17 00:00:00 2001 From: Armand Philippot Date: Fri, 17 Dec 2021 17:58:03 +0100 Subject: chore: display comments list on posts --- src/ts/types/comments.ts | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/ts/types/comments.ts') diff --git a/src/ts/types/comments.ts b/src/ts/types/comments.ts index b196142..51852d0 100644 --- a/src/ts/types/comments.ts +++ b/src/ts/types/comments.ts @@ -4,6 +4,10 @@ export type CommentAuthor = { url: string; }; +export type CommentAuthorResponse = { + node: CommentAuthor; +}; + export type Comment = { approved: ''; author: CommentAuthor; @@ -11,8 +15,14 @@ export type Comment = { content: string; date: string; id: string; + parentDatabaseId: number; + replies: Comment[]; +}; + +export type RawComment = Omit & { + author: CommentAuthorResponse; }; export type CommentsResponse = { - nodes: Comment[]; + nodes: RawComment[]; }; -- cgit v1.2.3