From a3c7e8f4c9dcef13b2a94f8480af54805104931b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nikola=20Dere=C5=BEi=C4=87?= Date: Tue, 6 Feb 2024 15:37:37 +0100 Subject: [PATCH] removing legacy code --- app/ui/BillEditForm.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) 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); }