fix: remove 5 unused variables across 4 user/credentials files

- PasswordReset.tsx: remove unused result variable
- UserProfile.tsx: remove unused Key import and err variable
- version-check-modal.tsx: remove unused setVersionDismissed setter
- CredentialsManager.tsx: remove unused e parameter from handleDragLeave

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
ZacharyZcR
2025-10-09 20:13:11 +08:00
parent c9417f87c0
commit 9896653232
4 changed files with 5 additions and 5 deletions

View File

@@ -308,7 +308,7 @@ export function CredentialsManager({
setDragOverFolder(folderName);
};
const handleDragLeave = (e: React.DragEvent) => {
const handleDragLeave = () => {
dragCounter.current--;
if (dragCounter.current === 0) {
setDragOverFolder(null);

View File

@@ -46,7 +46,7 @@ export function PasswordReset({ userInfo }: PasswordResetProps) {
setError(null);
setResetLoading(true);
try {
const result = await initiatePasswordReset(userInfo.username);
await initiatePasswordReset(userInfo.username);
setResetStep("verify");
setError(null);
} catch (err: any) {

View File

@@ -8,7 +8,7 @@ import {
TabsTrigger,
} from "@/components/ui/tabs.tsx";
import { Separator } from "@/components/ui/separator.tsx";
import { User, Shield, Key, AlertCircle } from "lucide-react";
import { User, Shield, AlertCircle } from "lucide-react";
import { TOTPSetup } from "@/ui/Desktop/User/TOTPSetup.tsx";
import { getUserInfo } from "@/ui/main-axios.ts";
import { getVersionInfo } from "@/ui/main-axios.ts";
@@ -45,7 +45,7 @@ export function UserProfile({ isTopbarOpen = true }: UserProfileProps) {
try {
const info = await getVersionInfo();
setVersionInfo({ version: info.localVersion });
} catch (err) {
} catch {
const { toast } = await import("sonner");
toast.error(t("user.failedToLoadVersionInfo"));
}