This commit is contained in:
Sol Irvine
2023-08-21 10:04:39 +09:00
parent 95eefa798b
commit 9a390aadcc
16 changed files with 15 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
import OpengraphImage from 'components/opengraph-image';
import { getCollection } from 'lib/shopify';
export const runtime = 'edge';
export default async function Image({ params }: { params: { collection: string } }) {
const collection = await getCollection({ handle: params.collection });
const title = collection?.seo?.title || collection?.title;
return await OpengraphImage({ title });
}