mirror of
https://github.com/vercel/commerce.git
synced 2025-07-23 04:36:49 +00:00
Test
This commit is contained in:
@@ -8,7 +8,6 @@ import { draftMode } from 'next/headers';
|
||||
import { notFound } from 'next/navigation';
|
||||
|
||||
export const runtime = 'edge';
|
||||
export const dynamic = 'force-dynamic';
|
||||
|
||||
export async function generateMetadata({
|
||||
params
|
||||
@@ -31,16 +30,12 @@ interface HomePageParams {
|
||||
}
|
||||
|
||||
export default async function IndexPage({ params }: HomePageParams) {
|
||||
// const preview = draftMode().isEnabled ? { token: process.env.SANITY_API_READ_TOKEN } : undefined;
|
||||
|
||||
const data = await getHomePage(params.locale);
|
||||
|
||||
if (!data && !draftMode().isEnabled) {
|
||||
notFound();
|
||||
}
|
||||
|
||||
console.log('Preview:', draftMode().isEnabled);
|
||||
|
||||
return (
|
||||
<LiveQuery
|
||||
enabled={draftMode().isEnabled}
|
||||
|
Reference in New Issue
Block a user