2023-12-08 05:20:55 +00:00
|
|
|
import React from 'react';
|
2023-12-11 14:35:34 +00:00
|
|
|
import { createBrowserRouter, RouterProvider } from 'react-router-dom';
|
|
|
|
|
2023-12-22 08:49:59 +00:00
|
|
|
import DashboardLayout from './layouts/Dashboard';
|
2023-12-18 11:28:17 +00:00
|
|
|
import Home from './pages/index';
|
2023-12-22 08:49:59 +00:00
|
|
|
import Settings from './pages/Settings';
|
|
|
|
import {
|
|
|
|
projectsRoutesWithSearch,
|
|
|
|
projectsRoutesWithoutSearch,
|
|
|
|
} from './pages/projects/routes';
|
|
|
|
import ProjectSearchLayout from './layouts/ProjectSearch';
|
2023-12-11 14:35:34 +00:00
|
|
|
|
|
|
|
const router = createBrowserRouter([
|
|
|
|
{
|
2023-12-22 08:49:59 +00:00
|
|
|
element: <DashboardLayout />,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
element: <ProjectSearchLayout />,
|
|
|
|
children: [
|
|
|
|
{
|
|
|
|
path: '/',
|
|
|
|
element: <Home />,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'projects',
|
|
|
|
children: projectsRoutesWithSearch,
|
|
|
|
},
|
|
|
|
],
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'settings',
|
|
|
|
element: <Settings />,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
path: 'projects',
|
|
|
|
children: projectsRoutesWithoutSearch,
|
|
|
|
},
|
|
|
|
],
|
2023-12-11 14:35:34 +00:00
|
|
|
},
|
|
|
|
]);
|
2023-12-08 05:20:55 +00:00
|
|
|
|
|
|
|
function App() {
|
2023-12-11 14:35:34 +00:00
|
|
|
return <RouterProvider router={router} />;
|
2023-12-08 05:20:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
export default App;
|