implented adding year-month
This commit is contained in:
11
app/year-month/[id]/add/page.tsx
Normal file
11
app/year-month/[id]/add/page.tsx
Normal file
@@ -0,0 +1,11 @@
|
||||
import { addYearMonth } from '@/app/lib/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(`/`);
|
||||
}
|
||||
Reference in New Issue
Block a user