fix: remove 7 unused variables in widgets and Homepage components
Cleaned up unused imports, parameters, and variables: - DiskWidget.tsx: removed metricsHistory parameter - FileManagerContextMenu.tsx: removed ExternalLink import - Homepage.tsx: removed useTranslation import - HomepageAlertManager.tsx: removed loading variable - HomepageAuth.tsx: removed setCookie import (Desktop & Mobile) - HompageUpdateLog.tsx: removed err parameter Reduced lint errors from 222 to 216 (6 errors fixed) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -12,7 +12,7 @@ interface DiskWidgetProps {
|
|||||||
metricsHistory: ServerMetrics[];
|
metricsHistory: ServerMetrics[];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function DiskWidget({ metrics, metricsHistory }: DiskWidgetProps) {
|
export function DiskWidget({ metrics }: DiskWidgetProps) {
|
||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
|
|
||||||
// Prepare radial chart data
|
// Prepare radial chart data
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ import { HomepageUpdateLog } from "@/ui/Desktop/Homepage/HompageUpdateLog.tsx";
|
|||||||
import { HomepageAlertManager } from "@/ui/Desktop/Homepage/HomepageAlertManager.tsx";
|
import { HomepageAlertManager } from "@/ui/Desktop/Homepage/HomepageAlertManager.tsx";
|
||||||
import { Button } from "@/components/ui/button.tsx";
|
import { Button } from "@/components/ui/button.tsx";
|
||||||
import { getUserInfo, getDatabaseHealth, getCookie } from "@/ui/main-axios.ts";
|
import { getUserInfo, getDatabaseHealth, getCookie } from "@/ui/main-axios.ts";
|
||||||
import { useTranslation } from "react-i18next";
|
|
||||||
|
|
||||||
interface HomepageProps {
|
interface HomepageProps {
|
||||||
onSelectView: (view: string) => void;
|
onSelectView: (view: string) => void;
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ export function HomepageAlertManager({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [alerts, setAlerts] = useState<TermixAlert[]>([]);
|
const [alerts, setAlerts] = useState<TermixAlert[]>([]);
|
||||||
const [currentAlertIndex, setCurrentAlertIndex] = useState(0);
|
const [currentAlertIndex, setCurrentAlertIndex] = useState(0);
|
||||||
const [loading, setLoading] = useState(false);
|
const [, setLoading] = useState(false);
|
||||||
const [error, setError] = useState<string | null>(null);
|
const [error, setError] = useState<string | null>(null);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import {
|
|||||||
completePasswordReset,
|
completePasswordReset,
|
||||||
getOIDCAuthorizeUrl,
|
getOIDCAuthorizeUrl,
|
||||||
verifyTOTPLogin,
|
verifyTOTPLogin,
|
||||||
setCookie,
|
|
||||||
getCookie,
|
getCookie,
|
||||||
getServerConfig,
|
getServerConfig,
|
||||||
isElectron,
|
isElectron,
|
||||||
|
|||||||
@@ -66,7 +66,7 @@ export function HomepageUpdateLog({ loggedIn }: HomepageUpdateLogProps) {
|
|||||||
setVersionInfo(versionRes);
|
setVersionInfo(versionRes);
|
||||||
setError(null);
|
setError(null);
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch(() => {
|
||||||
setError(t("common.failedToFetchUpdateInfo"));
|
setError(t("common.failedToFetchUpdateInfo"));
|
||||||
})
|
})
|
||||||
.finally(() => setLoading(false));
|
.finally(() => setLoading(false));
|
||||||
|
|||||||
@@ -19,7 +19,6 @@ import {
|
|||||||
completePasswordReset,
|
completePasswordReset,
|
||||||
getOIDCAuthorizeUrl,
|
getOIDCAuthorizeUrl,
|
||||||
verifyTOTPLogin,
|
verifyTOTPLogin,
|
||||||
setCookie,
|
|
||||||
getCookie,
|
getCookie,
|
||||||
logoutUser,
|
logoutUser,
|
||||||
isElectron,
|
isElectron,
|
||||||
|
|||||||
Reference in New Issue
Block a user