fix: 修复全量模式综合管理用户排行榜泄漏到其他侧边栏
综合管理菜单存在两个 id 相同的「用户排行榜」子项,侧边栏以
key={item.id} 渲染导致 React keyed reconciliation 失效,离开综合
管理切换到其他一级菜单时重复 key 的节点无法正确卸载,残留到新的
侧边栏。删除冗余的 adminOnly 重复项(保留的项已通过 userPath 同时
覆盖 admin/非 admin)。
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
1 parent
2fce5e61c9
commit
1ece2c5a4f
1 file changed
-7
@@ -249,13 +249,6 @@ export const sidebarMenuItems: MenuItem[] = [
|
|||||||
path: "/page/strategy/admin/positions",
|
path: "/page/strategy/admin/positions",
|
||||||
adminOnly: true,
|
adminOnly: true,
|
||||||
},
|
},
|
||||||
{
|
|
||||||
id: "mgmt-user-leaderboard",
|
|
||||||
label: "用户排行榜",
|
|
||||||
icon: Trophy,
|
|
||||||
path: "/page/strategy/admin/user-leaderboard",
|
|
||||||
adminOnly: true,
|
|
||||||
},
|
|
||||||
{
|
{
|
||||||
id: "mgmt-admin-scheduled-tasks",
|
id: "mgmt-admin-scheduled-tasks",
|
||||||
label: "定时任务管理",
|
label: "定时任务管理",
|
||||||
|
|||||||
Reference in new issue
Block a user