fix: 修复后台菜单路由匹配和概览重定向循环

This commit is contained in:
que01 committed 2026-10-15 17:50:30 +08:00
1 parent bf4bbf81c7
commit 34bd8142de
4 files changed
+78 -4

No files matched your search

+6 -1
View File
@@ -1,6 +1,7 @@
import React, { useState } from "react";
import { ChangePassword, Login } from "../features/auth/AuthPages.js";
import { Dashboard } from "./Dashboard.js";
import { AdminRouter } from "./AdminRouter.js";
import { adminMessage as message } from "../components/AdminMessage.js";
export function Root() {
@@ -34,5 +35,9 @@ export function Root() {
/>
);
if (mustChangePassword) return <ChangePassword onComplete={() => setMustChangePassword(false)} />;
return <Dashboard onLogout={logout} role={role} />;
return (
<AdminRouter>
<Dashboard onLogout={logout} role={role} />
</AdminRouter>
);
}