From 3941d80ff120238b973451325b834ebd8377281e Mon Sep 17 00:00:00 2001
From: Biswa Kalyan Bhuyan <biswa@surgot.in>
Date: Sat, 26 Apr 2025 01:20:12 +0530
Subject: finance/frontend: fix: fixed lint error's

---
 frontend/src/app/(main)/loans/page.tsx | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

(limited to 'frontend/src/app/(main)/loans/page.tsx')

diff --git a/frontend/src/app/(main)/loans/page.tsx b/frontend/src/app/(main)/loans/page.tsx
index ef263fd..9055ec2 100644
--- a/frontend/src/app/(main)/loans/page.tsx
+++ b/frontend/src/app/(main)/loans/page.tsx
@@ -15,7 +15,8 @@ export default function LoansPage() {
   const [isAddDialogOpen, setIsAddDialogOpen] = useState(false);
   const [isDeleteDialogOpen, setIsDeleteDialogOpen] = useState(false);
   const [loanToDelete, setLoanToDelete] = useState<number | null>(null);
-  const [selectedLoan, setSelectedLoan] = useState<Loan | null>(null);
+  // eslint-disable-next-line @typescript-eslint/no-unused-vars
+  const [_selectedLoan, setSelectedLoan] = useState<Loan | null>(null);
 
   // Form state
   const [loanName, setLoanName] = useState('');
@@ -98,8 +99,9 @@ export default function LoansPage() {
       };
 
       createLoanMutation.mutate(loanData);
-    } catch (err: any) {
-      setFormError(err.message || 'Error creating loan');
+    } catch (err: Error | unknown) {
+      const errorMessage = err instanceof Error ? err.message : 'Error creating loan';
+      setFormError(errorMessage);
     }
   };
 
-- 
cgit v1.2.3-59-g8ed1b

