year & month replaced by yearMonth object

This commit is contained in:
2024-01-09 16:20:49 +01:00
parent 46b65711a8
commit d627ad757d
12 changed files with 82 additions and 64 deletions

View File

@@ -1,7 +1,6 @@
import { parseYearMonth } from '@/app/lib/format';
import { LocationEditForm } from '@/app/ui/LocationEditForm';
export default async function Page({ params:{ id } }: { params: { id:string } }) {
const [year, month] = id.split("-");
return (<LocationEditForm year={year} month={month} />);
return (<LocationEditForm yearMonth={ parseYearMonth(id) } />);
}