Skip to content

Connect, collaborate, and grow with a community of TypeScript developers

fix: blow away cache on commenting

bautistaaaa640bcfa4280
diff --git a/apps/web/src/app/[locale]/challenge/_components/comments/index.tsx b/apps/web/src/app/[locale]/challenge/_components/comments/index.tsx
index 81e90278..36d8e936 100644
--- a/apps/web/src/app/[locale]/challenge/_components/comments/index.tsx
+++ b/apps/web/src/app/[locale]/challenge/_components/comments/index.tsx
@@ -98,7 +98,7 @@ export function Comments({ preselectedCommentMetadata, rootId, type, expanded =
});
}
setText('');
- queryClient.invalidateQueries(queryKey);
+ queryClient.invalidateQueries([`${type.toLowerCase()}-${rootId}-comments`]);
} catch (e) {
toast({
title: 'Unauthorized',