Merge pull request #13 from zenzen-sol/sol/preview

fix: Add cache expiration and runtime to HomepageProducts component
This commit is contained in:
Sol Irvine 2023-10-10 08:20:52 +09:00 committed by GitHub
commit 5d8567a363
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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;