-
Notifications
You must be signed in to change notification settings - Fork 1
/
routes.js
87 lines (84 loc) · 2.49 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
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
// 1) <App> добавлять всем, а не писать руками?
// 2) Хотим ли сусанине аналог иерархии: <Route> <Route> </Route>?
// 3)
// const App = require('components/App');
// const DealersMarkFilter = require('components/DealersMarkFilter');
// {
// components: [App, DealersMarkFilter]
// }
//
const routes = [
{
name: 'dealers-mark',
pattern: '/dealers-mark/',
data: {
components: ['App', 'DealersMarkFilter']
/*
<Router component={App}>
<Route name='dealers-marks' path='/dealers-marks/' component={DealersMarkFilter}/>
</Router>
render() {
<App>
<DealersMarkFilter/>
</App>
}
*/
}
},
{
name: 'dealers-listing',
pattern: '/dilery/(cars/)(:mark/(:model:/(:super_gen/(:configuration_id/(:tech_param_id/))))):section/',
data: {
components: ['App', 'DealersListingPage']
}
},
{
name: 'catalog-index',
pattern: '(/:category)/catalog/',
data: {
components: ['App', 'CatalogApp', 'CatalogIndexPage']
/*
<Router component={App}>
<Route component={CatalogApp} path="(/:category)/catalog/"/>
<IndexRoute name='catalog-index' component={CatalogIndexPage}/>
</Route>
</Router>
render() {
<App>
<CatalogApp>
<CatalogIndexPage/>
</CatalogApp>
</App>
}
*/
}
},
{
name: 'catalog-model-listing',
pattern: '(/:category)/catalog/all/',
data: {
components: ['App', 'CatalogApp', 'CatalogModelListingPage']
}
},
{
name: 'atalog-mmm-filters',
pattern: '(/:category)/catalog/marks/',
data: {
components: ['App', 'CatalogApp', 'CatalogMarkFilter']
}
},
{
name: 'catalog-model-listing',
pattern: '(/:category)/catalog/:mark/',
data: {
components: ['App', 'CatalogApp', 'CatalogModelListingPage']
}
},
{
name: 'catalog-model-listing',
pattern: '(/:category)/catalog/:mark/:model/',
data: {
components: ['App', 'CatalogApp', 'CatalogGenerationListingPage']
}
}
];