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:
@@ -2,7 +2,7 @@ import React, { useEffect, useState } from "react";
|
|||||||
import { Status, StatusIndicator } from "@/components/ui/shadcn-io/status";
|
import { Status, StatusIndicator } from "@/components/ui/shadcn-io/status";
|
||||||
import { Button } from "@/components/ui/button.tsx";
|
import { Button } from "@/components/ui/button.tsx";
|
||||||
import { ButtonGroup } from "@/components/ui/button-group.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 { getServerStatusById } from "@/ui/main-axios.ts";
|
||||||
import { useTabs } from "@/ui/Mobile/Navigation/Tabs/TabContext.tsx";
|
import { useTabs } from "@/ui/Mobile/Navigation/Tabs/TabContext.tsx";
|
||||||
import type { HostProps } from "../../../../types/index.js";
|
import type { HostProps } from "../../../../types/index.js";
|
||||||
|
|||||||
@@ -75,7 +75,7 @@ export function LeftSidebar({
|
|||||||
}: LeftSidebarProps) {
|
}: LeftSidebarProps) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [hosts, setHosts] = useState<SSHHost[]>([]);
|
const [hosts, setHosts] = useState<SSHHost[]>([]);
|
||||||
const [hostsLoading, setHostsLoading] = useState(false);
|
const [hostsLoading] = useState(false);
|
||||||
const [hostsError, setHostsError] = useState<string | null>(null);
|
const [hostsError, setHostsError] = useState<string | null>(null);
|
||||||
const prevHostsRef = React.useRef<SSHHost[]>([]);
|
const prevHostsRef = React.useRef<SSHHost[]>([]);
|
||||||
const [search, setSearch] = useState("");
|
const [search, setSearch] = useState("");
|
||||||
@@ -90,7 +90,7 @@ export function LeftSidebar({
|
|||||||
setHosts(newHosts);
|
setHosts(newHosts);
|
||||||
prevHostsRef.current = newHosts;
|
prevHostsRef.current = newHosts;
|
||||||
}
|
}
|
||||||
} catch (err: any) {
|
} catch {
|
||||||
setHostsError(t("leftSidebar.failedToLoadHosts"));
|
setHostsError(t("leftSidebar.failedToLoadHosts"));
|
||||||
}
|
}
|
||||||
}, [t]);
|
}, [t]);
|
||||||
|
|||||||
Reference in New Issue
Block a user