| 1 |
import React from "react"; |
| 2 |
import Route, { generateRouteArray } from "./Route"; |
| 3 |
import WelcomePage from "../pages/WelcomePage"; |
| 4 |
import BlocksPage from "../pages/BlocksPage"; |
| 5 |
|
| 6 |
/** |
| 7 |
* Routes for admin menu. |
| 8 |
* |
| 9 |
* Last route is reserved for 404 page. |
| 10 |
* |
| 11 |
* @type {Array} routes array |
| 12 |
*/ |
| 13 |
const routes = [ |
| 14 |
{ |
| 15 |
path: "welcome", |
| 16 |
title: "Welcome", |
| 17 |
element: <WelcomePage />, |
| 18 |
}, |
| 19 |
{ |
| 20 |
path: "blocks", |
| 21 |
title: "Blocks", |
| 22 |
element: <BlocksPage />, |
| 23 |
}, |
| 24 |
{ |
| 25 |
path: "404", |
| 26 |
title: "404", |
| 27 |
element: <div>404</div>, |
| 28 |
}, |
| 29 |
]; |
| 30 |
|
| 31 |
/** |
| 32 |
* Generated route objects array. |
| 33 |
* |
| 34 |
* @type {Array<Route>} |
| 35 |
*/ |
| 36 |
export const routeObjects = generateRouteArray(routes); |
| 37 |
|
| 38 |
/** |
| 39 |
* @module routes |
| 40 |
*/ |
| 41 |
export default routes; |
| 42 |
|