From 2dbe96d9fe6d6a29f477b4893f1b87d4f674c2cf Mon Sep 17 00:00:00 2001 From: timthedev07 Date: Fri, 29 Dec 2023 18:34:53 +0100 Subject: [PATCH] final fix --- .../app/questions/[quid]/DeletionButtonWithConfirmation.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/src/app/questions/[quid]/DeletionButtonWithConfirmation.tsx b/app/src/app/questions/[quid]/DeletionButtonWithConfirmation.tsx index 8264c002..59b40c6b 100644 --- a/app/src/app/questions/[quid]/DeletionButtonWithConfirmation.tsx +++ b/app/src/app/questions/[quid]/DeletionButtonWithConfirmation.tsx @@ -37,11 +37,12 @@ export const DeletionButtonWithConfirmation: FC< const [show, setShow] = useState(false); const [modalOpen, setModalOpen] = useState(false); const [x, setX] = useState(""); - const { getQuestion, getQuestionAnswers } = trpc.useUtils(); + const { getQuestion, getQuestionAnswers, getQuestions } = trpc.useUtils(); const mutateQ = trpc.deleteQuestion.useMutation({ onSuccess: async () => { await getQuestion.invalidate({ quid }); + await getQuestions.invalidate({}, { refetchType: "all" }); }, }).mutateAsync;