mirror of
https://github.com/Paris-est-Ludique/intranet.git
synced 2025-09-11 13:56:29 +02:00
Initial commit
This commit is contained in:
28
src/routes/index.ts
Executable file
28
src/routes/index.ts
Executable file
@@ -0,0 +1,28 @@
|
||||
import { RouteConfig } from "react-router-config"
|
||||
|
||||
import App from "../app"
|
||||
import AsyncHome, { loadData as loadHomeData } from "../pages/Home"
|
||||
import AsyncUserInfo, { loadData as loadUserInfoData } from "../pages/UserInfo"
|
||||
import NotFound from "../pages/NotFound"
|
||||
|
||||
export default [
|
||||
{
|
||||
component: App,
|
||||
routes: [
|
||||
{
|
||||
path: "/",
|
||||
exact: true,
|
||||
component: AsyncHome, // Add your page here
|
||||
loadData: loadHomeData, // Add your pre-fetch method here
|
||||
},
|
||||
{
|
||||
path: "/UserInfo/:id",
|
||||
component: AsyncUserInfo,
|
||||
loadData: loadUserInfoData,
|
||||
},
|
||||
{
|
||||
component: NotFound,
|
||||
},
|
||||
],
|
||||
},
|
||||
] as RouteConfig[]
|
Reference in New Issue
Block a user