fix: remove 10 unused variables in Mobile files
Files fixed: - MobileApp.tsx: Removed getCookie, removeTab, isAdmin, id, err parameters - Mobile/HomepageAuth.tsx: Removed getCookie, error state, result, token, err parameters All @typescript-eslint/no-unused-vars errors in frontend now resolved! 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -19,7 +19,6 @@ import {
|
|||||||
completePasswordReset,
|
completePasswordReset,
|
||||||
getOIDCAuthorizeUrl,
|
getOIDCAuthorizeUrl,
|
||||||
verifyTOTPLogin,
|
verifyTOTPLogin,
|
||||||
getCookie,
|
|
||||||
logoutUser,
|
logoutUser,
|
||||||
isElectron,
|
isElectron,
|
||||||
} from "@/ui/main-axios.ts";
|
} from "@/ui/main-axios.ts";
|
||||||
@@ -63,7 +62,7 @@ export function HomepageAuth({
|
|||||||
const [signupConfirmPassword, setSignupConfirmPassword] = useState("");
|
const [signupConfirmPassword, setSignupConfirmPassword] = useState("");
|
||||||
const [loading, setLoading] = useState(false);
|
const [loading, setLoading] = useState(false);
|
||||||
const [oidcLoading, setOidcLoading] = useState(false);
|
const [oidcLoading, setOidcLoading] = useState(false);
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [, setError] = useState<string | null>(null);
|
||||||
const [internalLoggedIn, setInternalLoggedIn] = useState(false);
|
const [internalLoggedIn, setInternalLoggedIn] = useState(false);
|
||||||
const [firstUser, setFirstUser] = useState(false);
|
const [firstUser, setFirstUser] = useState(false);
|
||||||
const [firstUserToastShown, setFirstUserToastShown] = useState(false);
|
const [firstUserToastShown, setFirstUserToastShown] = useState(false);
|
||||||
@@ -239,7 +238,7 @@ export function HomepageAuth({
|
|||||||
setError(null);
|
setError(null);
|
||||||
setResetLoading(true);
|
setResetLoading(true);
|
||||||
try {
|
try {
|
||||||
const result = await initiatePasswordReset(localUsername);
|
await initiatePasswordReset(localUsername);
|
||||||
setResetStep("verify");
|
setResetStep("verify");
|
||||||
toast.success(t("messages.resetCodeSent"));
|
toast.success(t("messages.resetCodeSent"));
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
@@ -411,7 +410,6 @@ export function HomepageAuth({
|
|||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
const urlParams = new URLSearchParams(window.location.search);
|
const urlParams = new URLSearchParams(window.location.search);
|
||||||
const success = urlParams.get("success");
|
const success = urlParams.get("success");
|
||||||
const token = urlParams.get("token");
|
|
||||||
const error = urlParams.get("error");
|
const error = urlParams.get("error");
|
||||||
|
|
||||||
if (error) {
|
if (error) {
|
||||||
@@ -445,7 +443,7 @@ export function HomepageAuth({
|
|||||||
window.location.pathname,
|
window.location.pathname,
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch(() => {
|
||||||
toast.error(t("errors.failedUserInfo"));
|
toast.error(t("errors.failedUserInfo"));
|
||||||
setInternalLoggedIn(false);
|
setInternalLoggedIn(false);
|
||||||
setLoggedIn(false);
|
setLoggedIn(false);
|
||||||
|
|||||||
@@ -7,20 +7,20 @@ import {
|
|||||||
TabProvider,
|
TabProvider,
|
||||||
useTabs,
|
useTabs,
|
||||||
} from "@/ui/Mobile/Navigation/Tabs/TabContext.tsx";
|
} from "@/ui/Mobile/Navigation/Tabs/TabContext.tsx";
|
||||||
import { getUserInfo, getCookie } from "@/ui/main-axios.ts";
|
import { getUserInfo } from "@/ui/main-axios.ts";
|
||||||
import { HomepageAuth } from "@/ui/Mobile/Homepage/HomepageAuth.tsx";
|
import { HomepageAuth } from "@/ui/Mobile/Homepage/HomepageAuth.tsx";
|
||||||
import { useTranslation } from "react-i18next";
|
import { useTranslation } from "react-i18next";
|
||||||
import { Toaster } from "@/components/ui/sonner.tsx";
|
import { Toaster } from "@/components/ui/sonner.tsx";
|
||||||
|
|
||||||
const AppContent: FC = () => {
|
const AppContent: FC = () => {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const { tabs, currentTab, getTab, removeTab } = useTabs();
|
const { tabs, currentTab, getTab } = useTabs();
|
||||||
const [isSidebarOpen, setIsSidebarOpen] = React.useState(true);
|
const [isSidebarOpen, setIsSidebarOpen] = React.useState(true);
|
||||||
const [ready, setReady] = React.useState(true);
|
const [ready, setReady] = React.useState(true);
|
||||||
|
|
||||||
const [isAuthenticated, setIsAuthenticated] = useState(false);
|
const [isAuthenticated, setIsAuthenticated] = useState(false);
|
||||||
const [username, setUsername] = useState<string | null>(null);
|
const [username, setUsername] = useState<string | null>(null);
|
||||||
const [isAdmin, setIsAdmin] = useState(false);
|
const [, setIsAdmin] = useState(false);
|
||||||
const [authLoading, setAuthLoading] = useState(true);
|
const [authLoading, setAuthLoading] = useState(true);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
@@ -128,11 +128,11 @@ const AppContent: FC = () => {
|
|||||||
setLoggedIn={setIsAuthenticated}
|
setLoggedIn={setIsAuthenticated}
|
||||||
setIsAdmin={setIsAdmin}
|
setIsAdmin={setIsAdmin}
|
||||||
setUsername={setUsername}
|
setUsername={setUsername}
|
||||||
setUserId={(id) => {}}
|
setUserId={() => {}}
|
||||||
loggedIn={isAuthenticated}
|
loggedIn={isAuthenticated}
|
||||||
authLoading={authLoading}
|
authLoading={authLoading}
|
||||||
dbError={null}
|
dbError={null}
|
||||||
setDbError={(err) => {}}
|
setDbError={() => {}}
|
||||||
onAuthSuccess={handleAuthSuccess}
|
onAuthSuccess={handleAuthSuccess}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user