commerce/app/search/(collection)/opengraph-image.tsx
2023-07-14 13:08:06 +02:00

12 lines
389 B
TypeScript

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