import { ImageResponse } from 'next/og'; import { getProductBySlug } from '@/lib/mdx'; export const runtime = 'edge'; export default async function Image({ params: { locale, slug } }: { params: { locale: string, slug: string[] } }) { const productSlug = slug[slug.length - 1]; const product = await getProductBySlug(productSlug, locale); if (!product) { return new ImageResponse(
); } return new ImageResponse( (