import { prisma } from '@/lib/prisma'; interface Props { params: { id: string }; } export default async function PastePage({ params }: Props) { const paste = await prisma.paste.findUnique({ where: { id: params.id }, select: { title: true, content: true, createdAt: true, views: true }, }); if (!paste) return
Paste not found
; return (

{paste.title || 'Untitled'}

        {paste.content}
      

Views: {paste.views} ยท Created at: {new Date(paste.createdAt).toLocaleString()}

); }