diff --git a/frontend/app/(main)/components/page.tsx b/frontend/app/(main)/components/page.tsx
index 06704944..56ad7f4f 100644
--- a/frontend/app/(main)/components/page.tsx
+++ b/frontend/app/(main)/components/page.tsx
@@ -13,20 +13,16 @@ import {
import { Badge } from "@/components/ui/badge"
import { Button } from "@/components/ui/button"
import { Progress } from "@/components/ui/progress"
-import { Avatar, AvatarFallback, AvatarImage } from "@/components/ui/avatar"
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@/components/ui/tabs"
import {
Coins,
Gift,
- Inbox,
Layers,
Shield,
Info,
ArrowRight,
- Terminal,
Activity,
User,
- ExternalLink,
Code2,
Copy,
Check
diff --git a/frontend/components/common/admin/files.tsx b/frontend/components/common/admin/files.tsx
index 2e57e298..88731fa7 100644
--- a/frontend/components/common/admin/files.tsx
+++ b/frontend/components/common/admin/files.tsx
@@ -138,7 +138,11 @@ export function FilesMain() {
const toggleSelect = (id: string) => {
setSelectedIds((prev) => {
const next = new Set(prev)
- next.has(id) ? next.delete(id) : next.add(id)
+ if (next.has(id)) {
+ next.delete(id)
+ } else {
+ next.add(id)
+ }
return next
})
}
diff --git a/frontend/components/common/docs/api.tsx b/frontend/components/common/docs/api.tsx
index 950d4db5..a6fa7f33 100644
--- a/frontend/components/common/docs/api.tsx
+++ b/frontend/components/common/docs/api.tsx
@@ -40,7 +40,7 @@ export const apiSections: PolicySection[] = [
error_msg
string
- 错误信息。请求成功时为空字符串 `""`,失败时包含错误详情描述。
+ 错误信息。请求成功时为空字符串 `""`,失败时包含错误详情描述。
data
diff --git a/frontend/components/common/settings/info-tab.tsx b/frontend/components/common/settings/info-tab.tsx
index f50be326..b3d3eb37 100644
--- a/frontend/components/common/settings/info-tab.tsx
+++ b/frontend/components/common/settings/info-tab.tsx
@@ -38,8 +38,8 @@ export function InfoTab({ systemConfigsLength, authSourcesLength }: InfoTabProps
-
-
+ }).dependencies?.next} />
+ }).dependencies?.react} />
diff --git a/frontend/components/common/settings/other-tab.tsx b/frontend/components/common/settings/other-tab.tsx
index a8777293..fb34dd49 100644
--- a/frontend/components/common/settings/other-tab.tsx
+++ b/frontend/components/common/settings/other-tab.tsx
@@ -53,10 +53,9 @@ const MENU_GROUPS = [
interface OtherTabProps {
configs: Record
- systemConfigsQuery: any
}
-export function OtherTab({ configs, systemConfigsQuery }: OtherTabProps) {
+export function OtherTab({ configs }: OtherTabProps) {
const queryClient = useQueryClient()
const menuDisplayConfig = useMemo(() => {
diff --git a/frontend/components/common/settings/profile.tsx b/frontend/components/common/settings/profile.tsx
index 4128fc53..627d4b5d 100644
--- a/frontend/components/common/settings/profile.tsx
+++ b/frontend/components/common/settings/profile.tsx
@@ -92,7 +92,7 @@ export function ProfileMain() {
}, [user, isEditDialogOpen])
const changePasswordMutation = useMutation({
- mutationFn: (req: any) => AuthService.changePassword(req),
+ mutationFn: AuthService.changePassword,
onSuccess: () => {
toast.success("密码修改成功")
setOldPassword("")
@@ -122,7 +122,7 @@ export function ProfileMain() {
}
const updateProfileMutation = useMutation({
- mutationFn: (req: any) => AuthService.updateProfile(req),
+ mutationFn: AuthService.updateProfile,
onSuccess: () => {
toast.success("个人信息修改成功")
setIsEditDialogOpen(false)
@@ -197,8 +197,8 @@ export function ProfileMain() {
setIsCropDialogOpen(false)
setCropFile(null)
toast.success("头像上传成功,点击保存以生效")
- } catch (err: any) {
- toast.error(err.message || "上传头像失败")
+ } catch (err) {
+ toast.error((err as Error).message || "上传头像失败")
}
}
diff --git a/frontend/components/common/settings/security-tab.tsx b/frontend/components/common/settings/security-tab.tsx
index 8d10a5c9..4dabf956 100644
--- a/frontend/components/common/settings/security-tab.tsx
+++ b/frontend/components/common/settings/security-tab.tsx
@@ -1,7 +1,7 @@
"use client"
import {useEffect, useState} from "react"
-import {useMutation, useQuery, useQueryClient} from "@tanstack/react-query"
+import {useMutation, useQuery, useQueryClient, type UseQueryResult} from "@tanstack/react-query"
import {Fingerprint, Globe, Loader2, Lock, Mail, Pencil, Plus, Settings, Shield, Trash2, UserPlus} from "lucide-react"
import {Button} from "@/components/ui/button"
@@ -55,7 +55,7 @@ const SECURITY_KEYS = [
interface SecurityTabProps {
configs: Record
- systemConfigsQuery: any
+ systemConfigsQuery: UseQueryResult
}
export function SecurityTab({ configs, systemConfigsQuery }: SecurityTabProps) {
diff --git a/frontend/components/common/settings/system-settings.tsx b/frontend/components/common/settings/system-settings.tsx
index 173016fd..4a1c018e 100644
--- a/frontend/components/common/settings/system-settings.tsx
+++ b/frontend/components/common/settings/system-settings.tsx
@@ -102,7 +102,7 @@ export function SystemSettingsMain() {
-
+
- systemConfigsQuery: any
+ systemConfigsQuery: UseQueryResult
}
export function SystemTab({ configs, systemConfigsQuery }: SystemTabProps) {
diff --git a/frontend/components/home/developer-section.tsx b/frontend/components/home/developer-section.tsx
index d987b869..ac7e2527 100644
--- a/frontend/components/home/developer-section.tsx
+++ b/frontend/components/home/developer-section.tsx
@@ -3,7 +3,7 @@ import Link from "next/link";
import { cn } from "@/lib/utils";
import { motion } from "motion/react";
import { Button } from "@/components/ui/button";
-import { Book, Check, Copy, Key, Terminal } from "lucide-react";
+import { Book, Check, Copy, Terminal } from "lucide-react";
export interface DeveloperSectionProps {
className?: string;
diff --git a/frontend/components/home/hero-section.tsx b/frontend/components/home/hero-section.tsx
index 158d7a18..0174b89b 100644
--- a/frontend/components/home/hero-section.tsx
+++ b/frontend/components/home/hero-section.tsx
@@ -1,10 +1,9 @@
import * as React from "react";
import Link from "next/link";
import { motion } from "motion/react";
-import { ArrowRight, Zap, Shield, Globe, CreditCard, Wallet } from "lucide-react";
+import { ArrowRight, Zap, Shield, Globe, CreditCard } from "lucide-react";
import { cn } from "@/lib/utils";
import { Button } from "@/components/ui/button";
-import { CountingNumber } from "@/components/animate-ui/primitives/texts/counting-number";
export interface HeroSectionProps {
className?: string;
@@ -14,17 +13,6 @@ export interface HeroSectionProps {
* Hero Section - 首页 Hero 展示
*/
export const HeroSection = React.memo(function HeroSection({ className }: HeroSectionProps) {
- const [balance, setBalance] = React.useState(12450.0);
- const [income, setIncome] = React.useState(240.0);
-
- React.useEffect(() => {
- const interval = setInterval(() => {
- setBalance(Math.random() * (65123.45 - (-65)) + (-65));
- setIncome(Math.random() * (656.56 - (-65.65)) + (-65.65));
- }, 6565);
-
- return () => clearInterval(interval);
- }, []);
return (
diff --git a/frontend/components/ui/image-crop.tsx b/frontend/components/ui/image-crop.tsx
index 112e1582..d5167353 100644
--- a/frontend/components/ui/image-crop.tsx
+++ b/frontend/components/ui/image-crop.tsx
@@ -228,6 +228,7 @@ export const ImageCropContent = ({ style, className }: ImageCropContentProps) =>
{...reactCropProps}
>
{imgSrc && (
+ // eslint-disable-next-line @next/next/no-img-element
+ )}>
{children}
)
}
return (
-