11 lines
315 B
TypeScript
11 lines
315 B
TypeScript
import { addYearMonth } from '@/app/lib/actions/yearMonthActions';
|
|
import { revalidatePath } from 'next/cache';
|
|
import { redirect } from 'next/navigation';
|
|
|
|
export default async function Page({ params:{ id } }: { params: { id:string } }) {
|
|
|
|
await addYearMonth(id);
|
|
|
|
revalidatePath('/');
|
|
redirect(`/`);
|
|
} |