fix: resolve deprecated warnings in console

This commit is contained in:
wonfen
2025-02-18 07:10:28 +08:00
parent 1ece079978
commit 2dd646537e
5 changed files with 109 additions and 80 deletions

View File

@@ -1,4 +1,11 @@
import { Box, ButtonGroup, Grid, IconButton } from "@mui/material";
import {
Box,
ButtonGroup,
Grid,
IconButton,
Select,
MenuItem,
} from "@mui/material";
import { useLockFn } from "ahooks";
import { useTranslation } from "react-i18next";
import { BasePage, Notice } from "@/components/base";
@@ -31,6 +38,12 @@ const SettingPage = () => {
const mode = useThemeMode();
const isDark = mode === "light" ? false : true;
const routers = [
{ label: "Manual", path: "manual" },
{ label: "TG Channel", path: "telegram" },
{ label: "Github Repo", path: "github" },
];
return (
<BasePage
title={t("Settings")}
@@ -95,6 +108,15 @@ const SettingPage = () => {
</Box>
</Grid>
</Grid>
<Select size="small" sx={{ width: 140, "> div": { py: "7.5px" } }}>
{routers.map((page: { label: string; path: string }) => {
return (
<MenuItem key={page.path} value={page.path}>
{t(page.label)}
</MenuItem>
);
})}
</Select>
</BasePage>
);
};