mirror of
https://github.com/vercel/commerce.git
synced 2025-05-14 13:47:49 +00:00
Individual pages should be dynamic
This commit is contained in:
parent
b118a59fb2
commit
62179a040c
@ -4,8 +4,6 @@ import Prose from 'components/prose';
|
||||
import { getPage } from 'lib/shopify';
|
||||
import { notFound } from 'next/navigation';
|
||||
|
||||
export const revalidate = 43200; // 12 hours in seconds
|
||||
|
||||
export async function generateMetadata({
|
||||
params
|
||||
}: {
|
||||
|
@ -357,6 +357,7 @@ export async function getMenu(handle: string): Promise<Menu[]> {
|
||||
export async function getPage(handle: string): Promise<Page> {
|
||||
const res = await shopifyFetch<ShopifyPageOperation>({
|
||||
query: getPageQuery,
|
||||
cache: 'no-store',
|
||||
variables: { handle }
|
||||
});
|
||||
|
||||
@ -365,7 +366,8 @@ export async function getPage(handle: string): Promise<Page> {
|
||||
|
||||
export async function getPages(): Promise<Page[]> {
|
||||
const res = await shopifyFetch<ShopifyPagesOperation>({
|
||||
query: getPagesQuery
|
||||
query: getPagesQuery,
|
||||
cache: 'no-store'
|
||||
});
|
||||
|
||||
return removeEdgesAndNodes(res.body.data.pages);
|
||||
|
Loading…
x
Reference in New Issue
Block a user