mirror of
https://github.com/Tria-plc/emaui.git
synced 2026-08-26 19:12:50 +00:00
fix usermanagement issues
This commit is contained in:
@@ -9,7 +9,7 @@ import { useNavigate, useLocation } from 'react-router-dom';
|
||||
|
||||
const NAV_ITEMS = [
|
||||
{ label: 'Dashboard', icon: IconLayoutDashboard, path: '/dashboard' },
|
||||
{ label: 'User Management', icon: IconUsers, path: '/um' },
|
||||
{ label: 'User Management', icon: IconUsers, path: '/um/user-management/dashboard' },
|
||||
];
|
||||
|
||||
export function AppSidebar() {
|
||||
|
||||
@@ -15,15 +15,6 @@ import { ProtectedRoute } from './ProtectedRoute';
|
||||
import { DashboardPage } from '../features/dashboard/pages/DashboardPage';
|
||||
import UserManagementHostPage from '../features/user-management-host/UserManagementHostPage';
|
||||
|
||||
/** Wraps the authenticated area in the IAM provider stack. */
|
||||
function IamShell() {
|
||||
return (
|
||||
<IamProviders>
|
||||
<Outlet />
|
||||
</IamProviders>
|
||||
);
|
||||
}
|
||||
|
||||
const router = createBrowserRouter([
|
||||
{
|
||||
element: <AuthLayout />,
|
||||
@@ -33,22 +24,17 @@ const router = createBrowserRouter([
|
||||
{ path: '/otp-verify', element: <OTPVerificationPage /> },
|
||||
],
|
||||
},
|
||||
{ path: '/um/*', element: <UserManagementHostPage /> },
|
||||
{
|
||||
element: <ProtectedRoute />,
|
||||
children: [
|
||||
{
|
||||
element: <IamShell />,
|
||||
element: <BackofficeLayout />,
|
||||
children: [
|
||||
{
|
||||
element: <BackofficeLayout />,
|
||||
children: [
|
||||
{ index: true, element: <Navigate to="/dashboard" replace /> },
|
||||
{ path: 'dashboard', element: <DashboardPage /> },
|
||||
],
|
||||
},
|
||||
// User-management module runs full-screen (its own chrome), outside the shell.
|
||||
{ path: 'um/*', element: <UserManagementHostPage /> },
|
||||
{ index: true, element: <Navigate to="/dashboard" replace /> },
|
||||
{ path: 'dashboard', element: <DashboardPage /> },
|
||||
],
|
||||
|
||||
},
|
||||
],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user