diff --git a/app/(site)/[locale]/[...slug]/page.tsx b/app/(site)/[locale]/[...slug]/page.tsx index 8cdc78fdb..27fea6a95 100644 --- a/app/(site)/[locale]/[...slug]/page.tsx +++ b/app/(site)/[locale]/[...slug]/page.tsx @@ -13,6 +13,7 @@ import type { Metadata } from 'next'; import { LiveQuery } from 'next-sanity/preview/live-query'; import { draftMode } from 'next/headers'; import { notFound } from 'next/navigation'; +import { Suspense } from 'react'; export async function generateMetadata({ params @@ -107,10 +108,26 @@ export default async function Page({ params }: PageParams) { as={PagePreview} > <> - {docType === 'page' && } - {docType === 'product' && } - {docType === 'category' && } - {docType === 'search' && } + {docType === 'page' && ( + Loading page...}> + + + )} + {docType === 'product' && ( + Loading product...}> + + + )} + {docType === 'category' && ( + Loading category...}> + + + )} + {docType === 'search' && ( + Loading search...}> + + + )} );