commerce/app/search/[collection]/opengraph-image.tsx
2025-03-06 11:10:28 -06:00

14 lines
383 B
TypeScript

import OpengraphImage from 'components/opengraph-image';
import { fetchCollection as getCollection } from 'lib/sfcc/scapi';
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 });
}