moved page under locale
This commit is contained in:
13
app/[locale]/year-month/[id]/add/page.tsx
Normal file
13
app/[locale]/year-month/[id]/add/page.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import { addMonth } from '@/app/lib/actions/monthActions';
|
||||
import { gotoHome } from '@/app/lib/actions/navigationActions';
|
||||
import { parseYearMonth } from '@/app/lib/format';
|
||||
|
||||
export default async function Page({ params:{ id } }: { params: { id:string } }) {
|
||||
|
||||
const { year, month } = parseYearMonth(id);
|
||||
await addMonth({ year, month });
|
||||
|
||||
await gotoHome({ year, month });
|
||||
|
||||
return null; // if we don't return anything, the client-side will not re-validate cache
|
||||
}
|
||||
Reference in New Issue
Block a user