mirror of
https://github.com/vercel/commerce.git
synced 2025-05-14 13:47:49 +00:00
Update homepage-products.tsx
This commit is contained in:
parent
b030aaac2b
commit
c8cf4e6580
@ -8,6 +8,9 @@ import Link from 'next/link';
|
|||||||
import Label from '../label';
|
import Label from '../label';
|
||||||
import { GridTileImage } from './tile';
|
import { GridTileImage } from './tile';
|
||||||
|
|
||||||
|
export const runtime = 'edge';
|
||||||
|
export const revalidate = 300; // 5 minutes in seconds
|
||||||
|
|
||||||
function HomepageProductsItem({ item, priority }: { item: Product; priority?: boolean }) {
|
function HomepageProductsItem({ item, priority }: { item: Product; priority?: boolean }) {
|
||||||
const size = item?.variants?.[0]?.selectedOptions?.find((option) => option.name === 'Size');
|
const size = item?.variants?.[0]?.selectedOptions?.find((option) => option.name === 'Size');
|
||||||
const image = item?.variants?.[0]?.image;
|
const image = item?.variants?.[0]?.image;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user