Skip to content

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

fix: revalidate cache after posting a solution

bautistaaacb77d1012abd
diff --git a/apps/web/src/app/[locale]/challenge/[id]/solutions/_components/_actions.ts b/apps/web/src/app/[locale]/challenge/[id]/solutions/_components/_actions.ts
index c2e02652..b45232f4 100644
--- a/apps/web/src/app/[locale]/challenge/[id]/solutions/_components/_actions.ts
+++ b/apps/web/src/app/[locale]/challenge/[id]/solutions/_components/_actions.ts
@@ -23,6 +23,7 @@ export async function postSolution({ challengeId, description, title, userId }:
userId,
},
});
+ revalidateTag(`challenge-${challengeId}-submissions`);
}
export async function pinOrUnpinSolution(id: number, isPinned: boolean) {