commerce/app/search/[collection]/opengraph-image.tsx
Lee Robinson e2b2081058 Fix?
2024-04-17 21:38:19 -05:00

12 lines
388 B
TypeScript

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(params.collection);
const title = collection?.seo?.title || collection?.title;
return await OpengraphImage({ title });
}