import { addMonth } from '@/app/lib/actions/monthActions'; import { revalidatePath } from 'next/cache'; import { redirect } from 'next/navigation'; export default async function Page({ params:{ id } }: { params: { id:string } }) { const [year, month] = id.split("-"); await addMonth(year, month); revalidatePath('/'); redirect(`/`); }