Skip to content

Commit

Permalink
final fix
Browse files Browse the repository at this point in the history
  • Loading branch information
timthedev07 committed Dec 29, 2023
1 parent f0083a1 commit 2dbe96d
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,12 @@ export const DeletionButtonWithConfirmation: FC<
const [show, setShow] = useState<boolean>(false);
const [modalOpen, setModalOpen] = useState<boolean>(false);
const [x, setX] = useState<string>("");
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;

Expand Down

0 comments on commit 2dbe96d

Please sign in to comment.