import { notFound } from "next/navigation" import { getAnnouncementById } from "@/modules/announcements/data-access" import { getGrades } from "@/modules/school/data-access" import { AnnouncementForm } from "@/modules/announcements/components/announcement-form" export const dynamic = "force-dynamic" export default async function EditAnnouncementPage({ params, }: { params: Promise<{ id: string }> }) { const { id } = await params const [announcement, grades] = await Promise.all([ getAnnouncementById(id), getGrades(), ]) if (!announcement) notFound() return (
Update the announcement details below.