mirror of
https://github.com/vercel/commerce.git
synced 2025-05-19 07:56:59 +00:00
Merge pull request #13 from zenzen-sol/sol/preview
fix: Add cache expiration and runtime to HomepageProducts component
This commit is contained in:
commit
5d8567a363
@ -8,6 +8,9 @@ import Link from 'next/link';
|
||||
import Label from '../label';
|
||||
import { GridTileImage } from './tile';
|
||||
|
||||
export const runtime = 'edge';
|
||||
export const revalidate = 300; // 5 minutes in seconds
|
||||
|
||||
function HomepageProductsItem({ item, priority }: { item: Product; priority?: boolean }) {
|
||||
const size = item?.variants?.[0]?.selectedOptions?.find((option) => option.name === 'Size');
|
||||
const image = item?.variants?.[0]?.image;
|
||||
|
Loading…
x
Reference in New Issue
Block a user