fix: npm lint bugs fixed
This commit is contained in:
@@ -92,7 +92,7 @@ export async function SessionLogin(
|
|||||||
|
|
||||||
if (data.redirect_url) return { success: true, redirectURL: data.redirect_url };
|
if (data.redirect_url) return { success: true, redirectURL: data.redirect_url };
|
||||||
return { success: true };
|
return { success: true };
|
||||||
} catch (error) {
|
} catch {
|
||||||
return { success: false, message: t("serverError") };
|
return { success: false, message: t("serverError") };
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ export default function ConsentPage() {
|
|||||||
setSession(data);
|
setSession(data);
|
||||||
})
|
})
|
||||||
.catch(() => setError(t("invalidSession")));
|
.catch(() => setError(t("invalidSession")));
|
||||||
}, []);
|
}, [sessionToken, t]);
|
||||||
|
|
||||||
const handleDecision = async (allow: boolean) => {
|
const handleDecision = async (allow: boolean) => {
|
||||||
setIsSubmitting(true);
|
setIsSubmitting(true);
|
||||||
|
|||||||
@@ -3,8 +3,8 @@
|
|||||||
import Header from "@/components/header";
|
import Header from "@/components/header";
|
||||||
import { Skeleton } from "@/components/ui/skeleton";
|
import { Skeleton } from "@/components/ui/skeleton";
|
||||||
import { useLocale, useTranslations } from "next-intl";
|
import { useLocale, useTranslations } from "next-intl";
|
||||||
import type { AdminUser, Citizen, Consent, Permission, Position, User } from "@/types";
|
import type { AdminUser, Consent, Permission, Position, User } from "@/types";
|
||||||
import { AppWindowMacIcon, BriefcaseBusinessIcon, FileUserIcon, LogOutIcon, ShieldIcon, UserIcon } from "lucide-react";
|
import { AppWindowMacIcon, BriefcaseBusinessIcon, LogOutIcon, ShieldIcon, UserIcon } from "lucide-react";
|
||||||
import { Button } from "@/components/ui/button";
|
import { Button } from "@/components/ui/button";
|
||||||
import { useEffect, useMemo, useRef, useState } from "react";
|
import { useEffect, useMemo, useRef, useState } from "react";
|
||||||
import { Logout } from "@/actions/auth";
|
import { Logout } from "@/actions/auth";
|
||||||
|
|||||||
@@ -21,7 +21,6 @@ export default function Positions() {
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (positionsCache[locale]) return
|
if (positionsCache[locale]) return
|
||||||
|
|
||||||
setLoading(true)
|
|
||||||
fetchMyPositions(locale)
|
fetchMyPositions(locale)
|
||||||
.then((data) => {
|
.then((data) => {
|
||||||
positionsCache[locale] = data
|
positionsCache[locale] = data
|
||||||
|
|||||||
Reference in New Issue
Block a user