|
1 | 1 | import React from 'react'; |
2 | | -import Loadable from 'react-loadable' |
3 | | - |
4 | 2 | import DefaultLayout from './containers/DefaultLayout'; |
5 | 3 |
|
6 | | -function Loading() { |
7 | | - return <div>Loading...</div>; |
8 | | -} |
9 | | - |
10 | | -const Breadcrumbs = Loadable({ |
11 | | - loader: () => import('./views/Base/Breadcrumbs'), |
12 | | - loading: Loading, |
13 | | -}); |
14 | | - |
15 | | -const Cards = Loadable({ |
16 | | - loader: () => import('./views/Base/Cards'), |
17 | | - loading: Loading, |
18 | | -}); |
19 | | - |
20 | | -const Carousels = Loadable({ |
21 | | - loader: () => import('./views/Base/Carousels'), |
22 | | - loading: Loading, |
23 | | -}); |
24 | | - |
25 | | -const Collapses = Loadable({ |
26 | | - loader: () => import('./views/Base/Collapses'), |
27 | | - loading: Loading, |
28 | | -}); |
29 | | - |
30 | | -const Dropdowns = Loadable({ |
31 | | - loader: () => import('./views/Base/Dropdowns'), |
32 | | - loading: Loading, |
33 | | -}); |
34 | | - |
35 | | -const Forms = Loadable({ |
36 | | - loader: () => import('./views/Base/Forms'), |
37 | | - loading: Loading, |
38 | | -}); |
39 | | - |
40 | | -const Jumbotrons = Loadable({ |
41 | | - loader: () => import('./views/Base/Jumbotrons'), |
42 | | - loading: Loading, |
43 | | -}); |
44 | | - |
45 | | -const ListGroups = Loadable({ |
46 | | - loader: () => import('./views/Base/ListGroups'), |
47 | | - loading: Loading, |
48 | | -}); |
49 | | - |
50 | | -const Navbars = Loadable({ |
51 | | - loader: () => import('./views/Base/Navbars'), |
52 | | - loading: Loading, |
53 | | -}); |
54 | | - |
55 | | -const Navs = Loadable({ |
56 | | - loader: () => import('./views/Base/Navs'), |
57 | | - loading: Loading, |
58 | | -}); |
59 | | - |
60 | | -const Paginations = Loadable({ |
61 | | - loader: () => import('./views/Base/Paginations'), |
62 | | - loading: Loading, |
63 | | -}); |
64 | | - |
65 | | -const Popovers = Loadable({ |
66 | | - loader: () => import('./views/Base/Popovers'), |
67 | | - loading: Loading, |
68 | | -}); |
69 | | - |
70 | | -const ProgressBar = Loadable({ |
71 | | - loader: () => import('./views/Base/ProgressBar'), |
72 | | - loading: Loading, |
73 | | -}); |
74 | | - |
75 | | -const Switches = Loadable({ |
76 | | - loader: () => import('./views/Base/Switches'), |
77 | | - loading: Loading, |
78 | | -}); |
79 | | - |
80 | | -const Tables = Loadable({ |
81 | | - loader: () => import('./views/Base/Tables'), |
82 | | - loading: Loading, |
83 | | -}); |
84 | | - |
85 | | -const Tabs = Loadable({ |
86 | | - loader: () => import('./views/Base/Tabs'), |
87 | | - loading: Loading, |
88 | | -}); |
89 | | - |
90 | | -const Tooltips = Loadable({ |
91 | | - loader: () => import('./views/Base/Tooltips'), |
92 | | - loading: Loading, |
93 | | -}); |
94 | | - |
95 | | -const BrandButtons = Loadable({ |
96 | | - loader: () => import('./views/Buttons/BrandButtons'), |
97 | | - loading: Loading, |
98 | | -}); |
99 | | - |
100 | | -const ButtonDropdowns = Loadable({ |
101 | | - loader: () => import('./views/Buttons/ButtonDropdowns'), |
102 | | - loading: Loading, |
103 | | -}); |
104 | | - |
105 | | -const ButtonGroups = Loadable({ |
106 | | - loader: () => import('./views/Buttons/ButtonGroups'), |
107 | | - loading: Loading, |
108 | | -}); |
109 | | - |
110 | | -const Buttons = Loadable({ |
111 | | - loader: () => import('./views/Buttons/Buttons'), |
112 | | - loading: Loading, |
113 | | -}); |
114 | | - |
115 | | -const Charts = Loadable({ |
116 | | - loader: () => import('./views/Charts'), |
117 | | - loading: Loading, |
118 | | -}); |
119 | | - |
120 | | -const Dashboard = Loadable({ |
121 | | - loader: () => import('./views/Dashboard'), |
122 | | - loading: Loading, |
123 | | -}); |
124 | | - |
125 | | -const CoreUIIcons = Loadable({ |
126 | | - loader: () => import('./views/Icons/CoreUIIcons'), |
127 | | - loading: Loading, |
128 | | -}); |
129 | | - |
130 | | -const Flags = Loadable({ |
131 | | - loader: () => import('./views/Icons/Flags'), |
132 | | - loading: Loading, |
133 | | -}); |
134 | | - |
135 | | -const FontAwesome = Loadable({ |
136 | | - loader: () => import('./views/Icons/FontAwesome'), |
137 | | - loading: Loading, |
138 | | -}); |
139 | | - |
140 | | -const SimpleLineIcons = Loadable({ |
141 | | - loader: () => import('./views/Icons/SimpleLineIcons'), |
142 | | - loading: Loading, |
143 | | -}); |
144 | | - |
145 | | -const Alerts = Loadable({ |
146 | | - loader: () => import('./views/Notifications/Alerts'), |
147 | | - loading: Loading, |
148 | | -}); |
149 | | - |
150 | | -const Badges = Loadable({ |
151 | | - loader: () => import('./views/Notifications/Badges'), |
152 | | - loading: Loading, |
153 | | -}); |
154 | | - |
155 | | -const Modals = Loadable({ |
156 | | - loader: () => import('./views/Notifications/Modals'), |
157 | | - loading: Loading, |
158 | | -}); |
159 | | - |
160 | | -const Colors = Loadable({ |
161 | | - loader: () => import('./views/Theme/Colors'), |
162 | | - loading: Loading, |
163 | | -}); |
164 | | - |
165 | | -const Typography = Loadable({ |
166 | | - loader: () => import('./views/Theme/Typography'), |
167 | | - loading: Loading, |
168 | | -}); |
169 | | - |
170 | | -const Widgets = Loadable({ |
171 | | - loader: () => import('./views/Widgets/Widgets'), |
172 | | - loading: Loading, |
173 | | -}); |
174 | | - |
175 | | -const Users = Loadable({ |
176 | | - loader: () => import('./views/Users/Users'), |
177 | | - loading: Loading, |
178 | | -}); |
179 | | - |
180 | | -const User = Loadable({ |
181 | | - loader: () => import('./views/Users/User'), |
182 | | - loading: Loading, |
183 | | -}); |
184 | | - |
185 | | - |
| 4 | +const Breadcrumbs = React.lazy(() => import('./views/Base/Breadcrumbs')); |
| 5 | +const Cards = React.lazy(() => import('./views/Base/Cards')); |
| 6 | +const Carousels = React.lazy(() => import('./views/Base/Carousels')); |
| 7 | +const Collapses = React.lazy(() => import('./views/Base/Collapses')); |
| 8 | +const Dropdowns = React.lazy(() => import('./views/Base/Dropdowns')); |
| 9 | +const Forms = React.lazy(() => import('./views/Base/Forms')); |
| 10 | +const Jumbotrons = React.lazy(() => import('./views/Base/Jumbotrons')); |
| 11 | +const ListGroups = React.lazy(() => import('./views/Base/ListGroups')); |
| 12 | +const Navbars = React.lazy(() => import('./views/Base/Navbars')); |
| 13 | +const Navs = React.lazy(() => import('./views/Base/Navs')); |
| 14 | +const Paginations = React.lazy(() => import('./views/Base/Paginations')); |
| 15 | +const Popovers = React.lazy(() => import('./views/Base/Popovers')); |
| 16 | +const ProgressBar = React.lazy(() => import('./views/Base/ProgressBar')); |
| 17 | +const Switches = React.lazy(() => import('./views/Base/Switches')); |
| 18 | +const Tables = React.lazy(() => import('./views/Base/Tables')); |
| 19 | +const Tabs = React.lazy(() => import('./views/Base/Tabs')); |
| 20 | +const Tooltips = React.lazy(() => import('./views/Base/Tooltips')); |
| 21 | +const BrandButtons = React.lazy(() => import('./views/Buttons/BrandButtons')); |
| 22 | +const ButtonDropdowns = React.lazy(() => import('./views/Buttons/ButtonDropdowns')); |
| 23 | +const ButtonGroups = React.lazy(() => import('./views/Buttons/ButtonGroups')); |
| 24 | +const Buttons = React.lazy(() => import('./views/Buttons/Buttons')); |
| 25 | +const Charts = React.lazy(() => import('./views/Charts')); |
| 26 | +const Dashboard = React.lazy(() => import('./views/Dashboard')); |
| 27 | +const CoreUIIcons = React.lazy(() => import('./views/Icons/CoreUIIcons')); |
| 28 | +const Flags = React.lazy(() => import('./views/Icons/Flags')); |
| 29 | +const FontAwesome = React.lazy(() => import('./views/Icons/FontAwesome')); |
| 30 | +const SimpleLineIcons = React.lazy(() => import('./views/Icons/SimpleLineIcons')); |
| 31 | +const Alerts = React.lazy(() => import('./views/Notifications/Alerts')); |
| 32 | +const Badges = React.lazy(() => import('./views/Notifications/Badges')); |
| 33 | +const Modals = React.lazy(() => import('./views/Notifications/Modals')); |
| 34 | +const Colors = React.lazy(() => import('./views/Theme/Colors')); |
| 35 | +const Typography = React.lazy(() => import('./views/Theme/Typography')); |
| 36 | +const Widgets = React.lazy(() => import('./views/Widgets/Widgets')); |
| 37 | +const Users = React.lazy(() => import('./views/Users/Users')); |
| 38 | +const User = React.lazy(() => import('./views/Users/User')); |
186 | 39 |
|
187 | 40 | // https://github.com/ReactTraining/react-router/tree/master/packages/react-router-config |
188 | 41 | const routes = [ |
|
0 commit comments