diff options
author | 2025-04-26 01:20:12 +0530 | |
---|---|---|
committer | 2025-04-26 01:20:12 +0530 | |
commit | 3941d80ff120238b973451325b834ebd8377281e (patch) | |
tree | 4647b687ceb27cb6bb47ea73bdf12898dcce8023 /frontend/src/components | |
parent | 9d65a782ca3e2084ef0f560500f6014d7bd09bc0 (diff) | |
download | finance-3941d80ff120238b973451325b834ebd8377281e.tar.gz finance-3941d80ff120238b973451325b834ebd8377281e.tar.bz2 finance-3941d80ff120238b973451325b834ebd8377281e.zip |
finance/frontend: fix: fixed lint error's
Diffstat (limited to 'frontend/src/components')
-rw-r--r-- | frontend/src/components/shared/AuthContext.tsx | 6 | ||||
-rw-r--r-- | frontend/src/components/shared/Notification.tsx | 2 | ||||
-rw-r--r-- | frontend/src/components/ui/input.tsx | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/frontend/src/components/shared/AuthContext.tsx b/frontend/src/components/shared/AuthContext.tsx index a3ec5a0..eb27cc5 100644 --- a/frontend/src/components/shared/AuthContext.tsx +++ b/frontend/src/components/shared/AuthContext.tsx @@ -24,7 +24,8 @@ const AuthContext = createContext<AuthContextType | null>(null); export function AuthProvider({ children }: { children: ReactNode }) { const [user, setUser] = useState<User | null>(null); const [isLoading, setIsLoading] = useState<boolean>(true); - const router = useRouter(); + // eslint-disable-next-line @typescript-eslint/no-unused-vars + const _router = useRouter(); // Check if the user is already logged in useEffect(() => { @@ -38,7 +39,8 @@ export function AuthProvider({ children }: { children: ReactNode }) { try { const userData = await userApi.getProfile(); setUser(userData); - } catch (error) { + // eslint-disable-next-line @typescript-eslint/no-unused-vars + } catch (_error) { // Clear invalid token localStorage.removeItem('token'); } finally { diff --git a/frontend/src/components/shared/Notification.tsx b/frontend/src/components/shared/Notification.tsx index 68cbc7a..af7b924 100644 --- a/frontend/src/components/shared/Notification.tsx +++ b/frontend/src/components/shared/Notification.tsx @@ -70,7 +70,7 @@ export function Notification({ }; return ( - <div className={cn(notificationVariants({ variant: type as any }))}> + <div className={cn(notificationVariants({ variant: type }))}> <div className={cn( "flex h-8 w-8 items-center justify-center rounded-full", type === 'success' && "bg-primary/10", diff --git a/frontend/src/components/ui/input.tsx b/frontend/src/components/ui/input.tsx index 91d3df1..c15af1b 100644 --- a/frontend/src/components/ui/input.tsx +++ b/frontend/src/components/ui/input.tsx @@ -2,8 +2,7 @@ import * as React from "react" import { cn } from "@/lib/utils" -export interface InputProps - extends React.InputHTMLAttributes<HTMLInputElement> {} +export type InputProps = React.InputHTMLAttributes<HTMLInputElement>; const Input = React.forwardRef<HTMLInputElement, InputProps>( ({ className, type, ...props }, ref) => { |