From 5bb43e94c53d658d7ff5c6bd385f980832751e6c Mon Sep 17 00:00:00 2001 From: Pierre-Olivier Mauguet Date: Thu, 23 Nov 2023 15:45:33 +0100 Subject: [PATCH] fix: opmc with revalidate path (#1875) --- .../app/(default)/index-egapro/objectifs-mesures/actions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/app/src/app/(default)/index-egapro/objectifs-mesures/actions.ts b/packages/app/src/app/(default)/index-egapro/objectifs-mesures/actions.ts index 492509984..31dbc9056 100644 --- a/packages/app/src/app/(default)/index-egapro/objectifs-mesures/actions.ts +++ b/packages/app/src/app/(default)/index-egapro/objectifs-mesures/actions.ts @@ -12,7 +12,6 @@ import { DeclarationSpecificationError } from "@common/core-domain/domain/specif import { type UpdateOpMcDTO } from "@common/core-domain/dtos/UpdateOpMcDTO"; import { type ServerActionResponse } from "@common/utils/next"; import assert from "assert"; -import { revalidatePath } from "next/cache"; import { getServerSession } from "next-auth"; export async function getDeclarationOpmc(siren: string, year: number) { @@ -69,7 +68,8 @@ export async function updateDeclarationOpmc({ email, }); - revalidatePath(`/index-egapro/declaration/${siren}/${year}/pdf`); + // Note: [revalidatePath bug](https://github.com/vercel/next.js/issues/49387). Try to reactivate it when it will be fixed in Next (it seems to be fixed in Next 14). + // revalidatePath(`/index-egapro/declaration/${siren}/${year}/pdf`); return { ok: true,