From 998ded5e0b92f7d2308db2d261cd405c2e683d7d Mon Sep 17 00:00:00 2001 From: Tunglies Date: Wed, 21 May 2025 10:25:50 +0800 Subject: [PATCH] refactor: remove unused imports and adjust button height in logs and rules pages --- src/pages/logs.tsx | 4 ++-- src/pages/rules.tsx | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/src/pages/logs.tsx b/src/pages/logs.tsx index b66e03a4..8fedd052 100644 --- a/src/pages/logs.tsx +++ b/src/pages/logs.tsx @@ -8,7 +8,7 @@ import { PlayCircleOutlineRounded, PauseCircleOutlineRounded, } from "@mui/icons-material"; -import { LogLevel, clearLogs } from "@/hooks/use-log-data"; +import { LogLevel } from "@/hooks/use-log-data"; import { useClashInfo } from "@/hooks/use-clash"; import { useEnableLog } from "@/services/states"; import { BaseEmpty, BasePage } from "@/components/base"; @@ -112,7 +112,7 @@ const LogPage = () => { pt: 1, mb: 0.5, mx: "10px", - height: "36px", + height: "39px", display: "flex", alignItems: "center", }} diff --git a/src/pages/rules.tsx b/src/pages/rules.tsx index f697b3c6..152ced35 100644 --- a/src/pages/rules.tsx +++ b/src/pages/rules.tsx @@ -6,7 +6,6 @@ import { BaseEmpty, BasePage } from "@/components/base"; import RuleItem from "@/components/rule/rule-item"; import { ProviderButton } from "@/components/rule/provider-button"; import { BaseSearchBox } from "@/components/base/base-search-box"; -import { useTheme } from "@mui/material/styles"; import { ScrollTopButton } from "@/components/layout/scroll-top-button"; import { useAppData } from "@/providers/app-data-provider"; import { useVisibility } from "@/hooks/use-visibility"; @@ -14,8 +13,6 @@ import { useVisibility } from "@/hooks/use-visibility"; const RulesPage = () => { const { t } = useTranslation(); const { rules = [], refreshRules, refreshRuleProviders } = useAppData(); - const theme = useTheme(); - const isDark = theme.palette.mode === "dark"; const [match, setMatch] = useState(() => (_: string) => true); const virtuosoRef = useRef(null); const [showScrollTop, setShowScrollTop] = useState(false);