merge-ppr-branch-into-narai-commerce

This commit is contained in:
Sol Irvine
2023-11-12 15:40:52 +09:00
parent 12bcdd8a3c
commit 2a52c4920c
43 changed files with 308 additions and 767 deletions

View File

@@ -1,7 +1,3 @@
import { Suspense } from 'react';
export const revalidate = 300; // 5 minutes in seconds
export default function Layout({ children }: { children: React.ReactNode }) {
return <Suspense>{children}</Suspense>;
return <>{children}</>;
}

View File

@@ -1,9 +1,6 @@
import OpengraphImage from 'components/opengraph-image';
import { getPage } from 'lib/shopify';
export const runtime = 'edge';
export const revalidate = 300; // 5 minutes in seconds
export default async function Image({ params }: { params: { page: string } }) {
const page = await getPage({ handle: params.page });
const title = page.seo?.title || page.title;

View File

@@ -8,11 +8,8 @@ import { getCart, getPage, getProduct } from 'lib/shopify';
import { Product } from 'lib/shopify/types';
import { cookies } from 'next/headers';
import { notFound } from 'next/navigation';
import { Suspense } from 'react';
import ShopsNav from './shops-nav';
export const revalidate = 300; // 5 minutes in seconds
export async function generateMetadata({
params
}: {
@@ -61,9 +58,7 @@ export default async function Page({ params }: { params: { locale?: SupportedLoc
<Prose html={page.body as string} />
</div>
<Suspense>
<Footer cart={cart} />
</Suspense>
<Footer cart={cart} />
</div>
);
}