mirror of
https://github.com/vercel/commerce.git
synced 2025-05-15 05:56:59 +00:00
Update revalidate paths again
This commit is contained in:
parent
67bd84ebf9
commit
8244a6c0bb
@ -1,4 +1,5 @@
|
||||
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';
|
||||
@ -31,7 +32,7 @@ export async function POST(request: NextRequest) {
|
||||
let pathToRevalidate = "";
|
||||
|
||||
if (type === "home") {
|
||||
pathToRevalidate = `${locale}`
|
||||
pathToRevalidate = locale === i18n.defaultLocale ? `${slug}` : `${slug}${locale}`
|
||||
} else {
|
||||
pathToRevalidate = `${locale}${slug}`
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user