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:
@@ -16,7 +16,7 @@ export function VersionCheckModal({
|
|||||||
const { t } = useTranslation();
|
const { t } = useTranslation();
|
||||||
const [versionInfo, setVersionInfo] = useState<any>(null);
|
const [versionInfo, setVersionInfo] = useState<any>(null);
|
||||||
const [versionChecking, setVersionChecking] = useState(false);
|
const [versionChecking, setVersionChecking] = useState(false);
|
||||||
const [versionDismissed, setVersionDismissed] = useState(false);
|
const [versionDismissed] = useState(false);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
if (isElectron()) {
|
if (isElectron()) {
|
||||||
|
|||||||
@@ -308,7 +308,7 @@ export function CredentialsManager({
|
|||||||
setDragOverFolder(folderName);
|
setDragOverFolder(folderName);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDragLeave = (e: React.DragEvent) => {
|
const handleDragLeave = () => {
|
||||||
dragCounter.current--;
|
dragCounter.current--;
|
||||||
if (dragCounter.current === 0) {
|
if (dragCounter.current === 0) {
|
||||||
setDragOverFolder(null);
|
setDragOverFolder(null);
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export function PasswordReset({ userInfo }: PasswordResetProps) {
|
|||||||
setError(null);
|
setError(null);
|
||||||
setResetLoading(true);
|
setResetLoading(true);
|
||||||
try {
|
try {
|
||||||
const result = await initiatePasswordReset(userInfo.username);
|
await initiatePasswordReset(userInfo.username);
|
||||||
setResetStep("verify");
|
setResetStep("verify");
|
||||||
setError(null);
|
setError(null);
|
||||||
} catch (err: any) {
|
} catch (err: any) {
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
TabsTrigger,
|
TabsTrigger,
|
||||||
} from "@/components/ui/tabs.tsx";
|
} from "@/components/ui/tabs.tsx";
|
||||||
import { Separator } from "@/components/ui/separator.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 { TOTPSetup } from "@/ui/Desktop/User/TOTPSetup.tsx";
|
||||||
import { getUserInfo } from "@/ui/main-axios.ts";
|
import { getUserInfo } from "@/ui/main-axios.ts";
|
||||||
import { getVersionInfo } from "@/ui/main-axios.ts";
|
import { getVersionInfo } from "@/ui/main-axios.ts";
|
||||||
@@ -45,7 +45,7 @@ export function UserProfile({ isTopbarOpen = true }: UserProfileProps) {
|
|||||||
try {
|
try {
|
||||||
const info = await getVersionInfo();
|
const info = await getVersionInfo();
|
||||||
setVersionInfo({ version: info.localVersion });
|
setVersionInfo({ version: info.localVersion });
|
||||||
} catch (err) {
|
} catch {
|
||||||
const { toast } = await import("sonner");
|
const { toast } = await import("sonner");
|
||||||
toast.error(t("user.failedToLoadVersionInfo"));
|
toast.error(t("user.failedToLoadVersionInfo"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user