|
1 |
| -import { |
2 |
| - Alerts, |
3 |
| - Badges, |
4 |
| - Breadcrumbs, |
5 |
| - ButtonDropdowns, |
6 |
| - ButtonGroups, |
7 |
| - Buttons, |
8 |
| - Cards, |
9 |
| - Carousels, |
10 |
| - Charts, |
11 |
| - Collapses, |
12 |
| - Colors, |
13 |
| - CoreUIIcons, |
14 |
| - Dashboard, |
15 |
| - Dropdowns, |
16 |
| - Flags, |
17 |
| - FontAwesome, |
18 |
| - Forms, |
19 |
| - Jumbotrons, |
20 |
| - ListGroups, |
21 |
| - Modals, |
22 |
| - Navbars, |
23 |
| - Navs, |
24 |
| - Paginations, |
25 |
| - Popovers, |
26 |
| - ProgressBar, |
27 |
| - SimpleLineIcons, |
28 |
| - BrandButtons, |
29 |
| - Switches, |
30 |
| - Tables, |
31 |
| - Tabs, |
32 |
| - Tooltips, |
33 |
| - Typography, |
34 |
| - Widgets, |
35 |
| -} from './views'; |
| 1 | +import React from 'react'; |
| 2 | +import Loadable from 'react-loadable' |
| 3 | + |
36 | 4 | import DefaultLayout from './containers/DefaultLayout';
|
37 | 5 |
|
| 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/FontAwesome'), |
| 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 | + |
38 | 176 | // https://github.com/ReactTraining/react-router/tree/master/packages/react-router-config
|
39 | 177 | const routes = [
|
40 | 178 | { path: '/', exact: true, name: 'Home', component: DefaultLayout },
|
@@ -65,7 +203,7 @@ const routes = [
|
65 | 203 | { path: '/buttons/button-dropdowns', name: 'Button Dropdowns', component: ButtonDropdowns },
|
66 | 204 | { path: '/buttons/button-groups', name: 'Button Groups', component: ButtonGroups },
|
67 | 205 | { path: '/buttons/brand-buttons', name: 'Brand Buttons', component: BrandButtons },
|
68 |
| - { path: '/icons', exact: true, name: 'Icons', component: Flags }, |
| 206 | + { path: '/icons', exact: true, name: 'Icons', component: CoreUIIcons }, |
69 | 207 | { path: '/icons/coreui-icons', name: 'CoreUI Icons', component: CoreUIIcons },
|
70 | 208 | { path: '/icons/flags', name: 'Flags', component: Flags },
|
71 | 209 | { path: '/icons/font-awesome', name: 'Font Awesome', component: FontAwesome },
|
|
0 commit comments