From 7ad9cff390dccf583389ac11e634d1dea34be28e Mon Sep 17 00:00:00 2001 From: Ivan Rezchikov Date: Sat, 11 Jul 2026 19:33:11 +0300 Subject: [PATCH] fix: npm lint bugs fixed --- kotosoft-id-frontend/actions/auth.ts | 2 +- kotosoft-id-frontend/app/consent/page.tsx | 2 +- kotosoft-id-frontend/app/me/component.tsx | 4 ++-- kotosoft-id-frontend/app/me/items/positions.tsx | 1 - 4 files changed, 4 insertions(+), 5 deletions(-) diff --git a/kotosoft-id-frontend/actions/auth.ts b/kotosoft-id-frontend/actions/auth.ts index e5ea113..b49aa27 100644 --- a/kotosoft-id-frontend/actions/auth.ts +++ b/kotosoft-id-frontend/actions/auth.ts @@ -92,7 +92,7 @@ export async function SessionLogin( if (data.redirect_url) return { success: true, redirectURL: data.redirect_url }; return { success: true }; - } catch (error) { + } catch { return { success: false, message: t("serverError") }; } } diff --git a/kotosoft-id-frontend/app/consent/page.tsx b/kotosoft-id-frontend/app/consent/page.tsx index 7f12b0d..27ff079 100644 --- a/kotosoft-id-frontend/app/consent/page.tsx +++ b/kotosoft-id-frontend/app/consent/page.tsx @@ -32,7 +32,7 @@ export default function ConsentPage() { setSession(data); }) .catch(() => setError(t("invalidSession"))); - }, []); + }, [sessionToken, t]); const handleDecision = async (allow: boolean) => { setIsSubmitting(true); diff --git a/kotosoft-id-frontend/app/me/component.tsx b/kotosoft-id-frontend/app/me/component.tsx index ade7f6e..4e48bd9 100644 --- a/kotosoft-id-frontend/app/me/component.tsx +++ b/kotosoft-id-frontend/app/me/component.tsx @@ -3,8 +3,8 @@ import Header from "@/components/header"; import { Skeleton } from "@/components/ui/skeleton"; import { useLocale, useTranslations } from "next-intl"; -import type { AdminUser, Citizen, Consent, Permission, Position, User } from "@/types"; -import { AppWindowMacIcon, BriefcaseBusinessIcon, FileUserIcon, LogOutIcon, ShieldIcon, UserIcon } from "lucide-react"; +import type { AdminUser, Consent, Permission, Position, User } from "@/types"; +import { AppWindowMacIcon, BriefcaseBusinessIcon, LogOutIcon, ShieldIcon, UserIcon } from "lucide-react"; import { Button } from "@/components/ui/button"; import { useEffect, useMemo, useRef, useState } from "react"; import { Logout } from "@/actions/auth"; diff --git a/kotosoft-id-frontend/app/me/items/positions.tsx b/kotosoft-id-frontend/app/me/items/positions.tsx index 63019d7..1d9b1b6 100644 --- a/kotosoft-id-frontend/app/me/items/positions.tsx +++ b/kotosoft-id-frontend/app/me/items/positions.tsx @@ -21,7 +21,6 @@ export default function Positions() { useEffect(() => { if (positionsCache[locale]) return - setLoading(true) fetchMyPositions(locale) .then((data) => { positionsCache[locale] = data