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/app.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/ts/types/app.ts') diff --git a/src/ts/types/app.ts b/src/ts/types/app.ts index 3edc8a0..8e087fd 100644 --- a/src/ts/types/app.ts +++ b/src/ts/types/app.ts @@ -3,7 +3,7 @@ import { AppProps } from 'next/app'; import { ReactElement, ReactNode } from 'react'; import { PostBy, TotalArticles } from './articles'; import { AllPostsSlug, RawPostsList } from './blog'; -import { CommentData, CreateComment } from './comments'; +import { CommentData, CommentsByPostId, CreateComment } from './comments'; import { ContactData, SendEmail } from './contact'; import { AllTopics, @@ -34,6 +34,8 @@ export type VariablesType = T extends PostBy | TopicBy | ThematicBy ? Slug : T extends RawPostsList ? CursorPagination + : T extends CommentsByPostId + ? { id: number } : T extends CreateComment ? CommentData : T extends SendEmail @@ -46,6 +48,7 @@ export type RequestType = | AllTopicsSlug | AllThematics | AllThematicsSlug + | CommentsByPostId | CreateComment | PostBy | RawPostsList -- cgit v1.2.3