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

@@ -182,7 +182,11 @@ const SettingVerge = ({ onError }: Props) => {
>
<Select size="small" sx={{ width: 140, "> div": { py: "7.5px" } }}>
{routers.map((page: { label: string; path: string }) => {
return <MenuItem value={page.path}>{t(page.label)}</MenuItem>;
return (
<MenuItem key={page.path} value={page.path}>
{t(page.label)}
</MenuItem>
);
})}
</Select>
</GuardState>