aboutsummaryrefslogtreecommitdiffstats
path: root/src/ts
diff options
context:
space:
mode:
authorArmand Philippot <git@armandphilippot.com>2021-12-17 17:58:03 +0100
committerArmand Philippot <git@armandphilippot.com>2021-12-17 17:58:03 +0100
commitabf6e96383035f99addab804e8c3dd1a74d36375 (patch)
tree066d672466495f948885379ac8fd7fb1228ad4cf /src/ts
parent8a703cb39ff23ff3639b0da33f0d72f92f1cc55b (diff)
chore: display comments list on posts
Diffstat (limited to 'src/ts')
-rw-r--r--src/ts/types/comments.ts12
1 files changed, 11 insertions, 1 deletions
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<Comment, 'author'> & {
+ author: CommentAuthorResponse;
};
export type CommentsResponse = {
- nodes: Comment[];
+ nodes: RawComment[];
};