fix: remove 3 unused variables in Mobile navigation components

- Host.tsx: removed unused Server icon import
- LeftSidebar.tsx: removed unused setHostsLoading setter and err parameter

Continued reducing frontend lint errors
This commit is contained in:
ZacharyZcR
2025-10-09 19:50:21 +08:00
parent 15fde8d6ed
commit 0ab9065a00
2 changed files with 3 additions and 3 deletions

View File

@@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";
import { Status, StatusIndicator } from "@/components/ui/shadcn-io/status";
import { Button } from "@/components/ui/button.tsx";
import { ButtonGroup } from "@/components/ui/button-group.tsx";
import { Server, Terminal } from "lucide-react";
import { Terminal } from "lucide-react";
import { getServerStatusById } from "@/ui/main-axios.ts";
import { useTabs } from "@/ui/Mobile/Navigation/Tabs/TabContext.tsx";
import type { HostProps } from "../../../../types/index.js";

View File

@@ -75,7 +75,7 @@ export function LeftSidebar({
}: LeftSidebarProps) {
const { t } = useTranslation();
const [hosts, setHosts] = useState<SSHHost[]>([]);
const [hostsLoading, setHostsLoading] = useState(false);
const [hostsLoading] = useState(false);
const [hostsError, setHostsError] = useState<string | null>(null);
const prevHostsRef = React.useRef<SSHHost[]>([]);
const [search, setSearch] = useState("");
@@ -90,7 +90,7 @@ export function LeftSidebar({
setHosts(newHosts);
prevHostsRef.current = newHosts;
}
} catch (err: any) {
} catch {
setHostsError(t("leftSidebar.failedToLoadHosts"));
}
}, [t]);