From 218abc1d10013d2d2c38d395dd6ce58658f64b82 Mon Sep 17 00:00:00 2001 From: Henrik Larsson Date: Fri, 7 Jul 2023 13:47:50 +0200 Subject: [PATCH] Update revalidate paths again --- app/api/revalidate/sanity/route.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/app/api/revalidate/sanity/route.ts b/app/api/revalidate/sanity/route.ts index 3508fdf22..43697f00a 100644 --- a/app/api/revalidate/sanity/route.ts +++ b/app/api/revalidate/sanity/route.ts @@ -1,5 +1,4 @@ import { isValidSignature, SIGNATURE_HEADER_NAME } from '@sanity/webhook'; -import { i18n } from 'i18n-config'; import { revalidatePath } from 'next/cache'; import { headers } from 'next/headers'; import { NextRequest, NextResponse } from 'next/server'; @@ -32,7 +31,7 @@ export async function POST(request: NextRequest) { let pathToRevalidate = ""; if (type === "home") { - pathToRevalidate = locale === i18n.defaultLocale ? `${slug}` : `${slug}${locale}` + pathToRevalidate = `${slug}${locale}` } else { pathToRevalidate = `${locale}${slug}` }