diff --git a/app/ui/BillDeleteForm.tsx b/app/ui/BillDeleteForm.tsx index 1427625..3be7946 100644 --- a/app/ui/BillDeleteForm.tsx +++ b/app/ui/BillDeleteForm.tsx @@ -19,7 +19,7 @@ export const BillDeleteForm:FC = ({ bill, location }) => const [ state, dispatch ] = useFormState(handleAction, null); const handleCancel = () => { - gotoHome(`/?year=${location.yearMonth.year}`); + gotoHome(`/?year=${location.yearMonth.year}&month=${location.yearMonth.month}`); }; return( diff --git a/app/ui/BillEditForm.tsx b/app/ui/BillEditForm.tsx index 21ce677..215facd 100644 --- a/app/ui/BillEditForm.tsx +++ b/app/ui/BillEditForm.tsx @@ -37,7 +37,7 @@ export const BillEditForm:FC = ({ location, bill }) => { // redirect to the main page const handleCancel = () => { - gotoHome(billYear ? `/?year=${billYear}` : undefined); + gotoHome(billYear ? `/?year=${billYear}&month=${location.yearMonth.month}` : undefined); }; const billPaid_handleChange = (event: React.ChangeEvent) => { diff --git a/app/ui/LocationEditForm.tsx b/app/ui/LocationEditForm.tsx index 1f236cd..d7c305a 100644 --- a/app/ui/LocationEditForm.tsx +++ b/app/ui/LocationEditForm.tsx @@ -24,8 +24,7 @@ export const LocationEditForm:FC = ({ location, yearMonth // redirect to the main page const handleCancel = () => { - console.log('handleCancel'); - gotoHome(location ? `/?year=${location?.yearMonth?.year}` : undefined); + gotoHome(location ? `/?year=${location?.yearMonth?.year}&month=${location?.yearMonth?.month}` : undefined); }; return(