diff --git a/app/ui/BillEditForm.tsx b/app/ui/BillEditForm.tsx index 500ca12..b08e84c 100644 --- a/app/ui/BillEditForm.tsx +++ b/app/ui/BillEditForm.tsx @@ -6,7 +6,6 @@ import React, { FC } from "react"; import { useFormState } from "react-dom"; import { updateOrAddBill } from "../lib/actions/billActions"; import Link from "next/link"; -import { gotoHome } from "../lib/actions/navigationActions"; import { formatYearMonth } from "../lib/format"; // Next.js does not encode an utf-8 file name correctly when sending a form with a file attachment @@ -35,12 +34,7 @@ export const BillEditForm:FC = ({ location, bill }) => { const [ isPaid, setIsPaid ] = React.useState(paid); - // redirect to the main page - const handleCancel = () => { - gotoHome(location.yearMonth); - }; - - const billPaid_handleChange = (event: React.ChangeEvent) => { + const billPaid_handleChange = (event: React.ChangeEvent) => { setIsPaid(event.target.checked); }