-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathroutes.js
25 lines (23 loc) · 1.04 KB
/
routes.js
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
import {Home} from './components/Home';
import {Index} from './components/Index';
import {Login} from './components/Login';
// Route Nodes
import Sections from './nodecomponents/Sections/Sections';
import SubSections from './nodecomponents/SubSections/SubSections';
export default [
{ name: 'home', path: '/', component: Home},
{ name: 'login', path: '/login', component: Login},
{ name: 'index', path: '/index/:id', component: Index},
{ name: 'section', path: '/section', component: Sections, children: [
// Sections
{ name: 'home', path: '/home', component: null }, // route without a component, It will throw but app won't fail
{ name: 'login', path: '/login', component: Login },
{ name: 'index', path: '/index/:id', component: Index },
{ name: 'subsection', path: '/subsection', component: SubSections, children: [
// Subsections
{ name: 'home', path: '/home', component: Home },
{ name: 'login', path: '/login', component: Login },
{ name: 'index', path: '/index/:id', component: Index }
]}
]}
];