forked from N4si/DevSecOps-Project
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.tsx
36 lines (33 loc) · 803 Bytes
/
index.tsx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
import { Navigate, createBrowserRouter } from "react-router-dom";
import { MAIN_PATH } from "src/constant";
import MainLayout from "src/layouts/MainLayout";
const router = createBrowserRouter([
{
path: "/",
element: <MainLayout />,
children: [
{
path: MAIN_PATH.root,
element: <Navigate to={`/${MAIN_PATH.browse}`} />,
},
{
path: MAIN_PATH.browse,
lazy: () => import("src/pages/HomePage"),
},
{
path: MAIN_PATH.genreExplore,
children: [
{
path: ":genreId",
lazy: () => import("src/pages/GenreExplore"),
},
],
},
{
path: MAIN_PATH.watch,
lazy: () => import("src/pages/WatchPage"),
},
],
},
]);
export default router;