Merge branch 'feature/pencil-design' of github.com:Tria-plc/emaui into feature/pencil-design

This commit is contained in:
mengstabketemaw
2026-06-15 13:32:05 +03:00
8 changed files with 15113 additions and 64 deletions

View File

@@ -1,4 +1,9 @@
import { createBrowserRouter, RouterProvider, Navigate } from 'react-router-dom';
import {
createBrowserRouter,
RouterProvider,
Navigate,
Outlet,
} from 'react-router-dom';
import {
LoginPage,
ForgotPasswordPage,
@@ -10,6 +15,15 @@ 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 />,
@@ -23,14 +37,21 @@ const router = createBrowserRouter([
element: <ProtectedRoute />,
children: [
{
element: <BackofficeLayout />,
element: <IamShell />,
children: [
{ path: '/dashboard', element: <DashboardPage /> },
{
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 /> },
],
},
],
},
{ path: '/um/*', element: <UserManagementHostPage /> },
{ path: '/404', element: <div>Page not found</div> },
{ path: '*', element: <Navigate to="/404" replace /> },
]);