feat(frontend): implement step 1 - entity task detail and scheduler UX
This commit is contained in:
@@ -1,16 +1,23 @@
|
||||
import { createBrowserRouter } from 'react-router-dom'
|
||||
import { lazy, Suspense, ReactNode } from 'react'
|
||||
import ProtectedRoute from '../components/ProtectedRoute'
|
||||
import NavBar from '../components/NavBar'
|
||||
|
||||
const LoginPage = lazy(() => import('../pages/LoginPage'))
|
||||
const DashboardPage = lazy(() => import('../pages/DashboardPage'))
|
||||
const EntitiesPage = lazy(() => import('../pages/EntitiesPage'))
|
||||
const EntityDetailPage = lazy(() => import('../pages/EntityDetailPage'))
|
||||
const LogsPage = lazy(() => import('../pages/LogsPage'))
|
||||
|
||||
function Protected({ children }: { children: ReactNode }) {
|
||||
return (
|
||||
<Suspense fallback={<div>Loading...</div>}>
|
||||
<ProtectedRoute>{children}</ProtectedRoute>
|
||||
<ProtectedRoute>
|
||||
<div className="min-h-screen bg-slate-950 text-slate-100">
|
||||
<NavBar />
|
||||
{children}
|
||||
</div>
|
||||
</ProtectedRoute>
|
||||
</Suspense>
|
||||
)
|
||||
}
|
||||
@@ -40,6 +47,14 @@ export const router = createBrowserRouter([
|
||||
</Protected>
|
||||
),
|
||||
},
|
||||
{
|
||||
path: '/entities/:entityId',
|
||||
element: (
|
||||
<Protected>
|
||||
<EntityDetailPage />
|
||||
</Protected>
|
||||
),
|
||||
},
|
||||
{
|
||||
path: '/logs',
|
||||
element: (
|
||||
|
||||
Reference in New Issue
Block a user