commerce/app/search/[collection]/opengraph-image.tsx
2023-06-28 15:30:23 +02:00

12 lines
383 B
TypeScript

import OpengraphImage from 'components/opengraph-image';
import { getCategory } from 'lib/medusa';
export const runtime = 'edge';
export default async function Image({ params }: { params: { collection: string } }) {
const collection = await getCategory(params.collection);
const title = collection?.seo?.title || collection?.title;
return await OpengraphImage({ title });
}