import { ImageResponse } from 'next/og' import { getSharedChat } from '@/app/actions' import { IconW3GPT } from '@/components/ui/icons' export const alt = 'Web3 GPT' export const size = { width: 1200, height: 630 } export const contentType = 'image/png' // const interRegular = fetch( // new URL('../../../assets/fonts/Inter-Regular.woff', import.meta.url) // ).then(res => res.arrayBuffer()) // const interBold = fetch( // new URL('../../../assets/fonts/Inter-Bold.woff', import.meta.url) // ).then(res => res.arrayBuffer()) interface ImageProps { params: { id: string } } export default async function Image({ params }: ImageProps) { const chat = await getSharedChat(params.id) if (!chat || !chat?.sharePath) { return null } const textAlign = chat?.title?.length > 40 ? 'items-start' : 'items-center' return new ImageResponse( (