Skip to content

Commit

Permalink
fix: invalidate comments query cache
Browse files Browse the repository at this point in the history
  • Loading branch information
olexh committed May 26, 2024
1 parent d34020e commit e2f49b7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion features/comments/comment-list/comment-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,13 @@ const CommentInput: FC<Props> = forwardRef(

const onSuccess = async () => {
await queryClient.invalidateQueries({
queryKey: ['comments', slug],
queryKey: ['comments', slug, content_type],
exact: false,
});

await queryClient.invalidateQueries({
queryKey: ['commentThread'],
exact: false,
});

editorRef.current?.setMarkdown('');
Expand Down

0 comments on commit e2f49b7

Please sign in to comment.