fix usermanagement issues

This commit is contained in:
mengstabketemaw
2026-06-15 13:57:01 +03:00
parent e71f246c4c
commit a229259df6
3 changed files with 7 additions and 21 deletions

View File

@@ -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() {

View File

@@ -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 /> },
],
},
],
},