commerce/app/search/[collection]/opengraph-image.tsx

14 lines
361 B
TypeScript
Raw Permalink Normal View History

import OpengraphImage from 'components/opengraph-image';
import { getCollection } from 'lib/shopify';
2025-02-09 11:38:22 -06:00
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 });
}