import { prisma } from '@/lib/prisma' import { notFound } from 'next/navigation' import { NoteForm } from '@/components/note-form' import { NoteType } from '@/types/note' export default async function EditNotePage({ params }: { params: Promise<{ id: string }> }) { const { id } = await params const note = await prisma.note.findUnique({ where: { id }, include: { tags: { include: { tag: true } } }, }) if (!note) { notFound() } const noteWithTags = { ...note, createdAt: note.createdAt.toISOString(), updatedAt: note.updatedAt.toISOString(), type: note.type as NoteType, tags: note.tags.map(nt => ({ tag: nt.tag })), } return (

Editar nota

) }