import { notFound } from 'next/navigation' import { getPublishedNote } from '@/app/actions/notes-publishing' import { FileText, Calendar } from 'lucide-react' import { format } from 'date-fns' export async function generateMetadata({ params }: { params: Promise<{ slug: string }> }) { const { slug } = await params const note = await getPublishedNote(slug) if (!note) return { title: 'Note not found' } return { title: note.title || 'Published note', description: note.content?.replace(/<[^>]+>/g, '').slice(0, 160) } } export const dynamic = 'force-static' export const revalidate = 3600 export default async function PublishedNotePage({ params }: { params: Promise<{ slug: string }> }) { const { slug } = await params const note = await getPublishedNote(slug) if (!note) notFound() return (
par {note.user.name}
)}Publié sur Momento