Guest User

Untitled

a guest
May 24th, 2018
102
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.40 KB | None | 0 0
  1. import React from 'react';
  2. import Loadable from 'react-loadable'
  3.  
  4. import DefaultLayout from './containers/DefaultLayout';
  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/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.  
  176. // https://github.com/ReactTraining/react-router/tree/master/packages/react-router-config
  177. const routes = [
  178. { path: '/', exact: true, name: 'Home', component: DefaultLayout },
  179. { path: '/dashboard', name: 'Dashboard', component: Dashboard },
  180. { path: '/theme', exact: true, name: 'Theme', component: Colors },
  181. { path: '/theme/colors', name: 'Colors', component: Colors },
  182. { path: '/theme/typography', name: 'Typography', component: Typography },
  183. { path: '/base', exact: true, name: 'Base', component: Cards },
  184. { path: '/base/cards', name: 'Cards', component: Cards },
  185. { path: '/base/forms', name: 'Forms', component: Forms },
  186. { path: '/base/switches', name: 'Switches', component: Switches },
  187. { path: '/base/tables', name: 'Tables', component: Tables },
  188. { path: '/base/tabs', name: 'Tabs', component: Tabs },
  189. { path: '/base/breadcrumbs', name: 'Breadcrumbs', component: Breadcrumbs },
  190. { path: '/base/carousels', name: 'Carousel', component: Carousels },
  191. { path: '/base/collapses', name: 'Collapse', component: Collapses },
  192. { path: '/base/dropdowns', name: 'Dropdowns', component: Dropdowns },
  193. { path: '/base/jumbotrons', name: 'Jumbotrons', component: Jumbotrons },
  194. { path: '/base/list-groups', name: 'List Groups', component: ListGroups },
  195. { path: '/base/navbars', name: 'Navbars', component: Navbars },
  196. { path: '/base/navs', name: 'Navs', component: Navs },
  197. { path: '/base/paginations', name: 'Paginations', component: Paginations },
  198. { path: '/base/popovers', name: 'Popovers', component: Popovers },
  199. { path: '/base/progress-bar', name: 'Progress Bar', component: ProgressBar },
  200. { path: '/base/tooltips', name: 'Tooltips', component: Tooltips },
  201. { path: '/buttons', exact: true, name: 'Buttons', component: Buttons },
  202. { path: '/buttons/buttons', name: 'Buttons', component: Buttons },
  203. { path: '/buttons/button-dropdowns', name: 'Button Dropdowns', component: ButtonDropdowns },
  204. { path: '/buttons/button-groups', name: 'Button Groups', component: ButtonGroups },
  205. { path: '/buttons/brand-buttons', name: 'Brand Buttons', component: BrandButtons },
  206. { path: '/icons', exact: true, name: 'Icons', component: CoreUIIcons },
  207. { path: '/icons/coreui-icons', name: 'CoreUI Icons', component: CoreUIIcons },
  208. { path: '/icons/flags', name: 'Flags', component: Flags },
  209. { path: '/icons/font-awesome', name: 'Font Awesome', component: FontAwesome },
  210. { path: '/icons/simple-line-icons', name: 'Simple Line Icons', component: SimpleLineIcons },
  211. { path: '/notifications', exact: true, name: 'Notifications', component: Alerts },
  212. { path: '/notifications/alerts', name: 'Alerts', component: Alerts },
  213. { path: '/notifications/badges', name: 'Badges', component: Badges },
  214. { path: '/notifications/modals', name: 'Modals', component: Modals },
  215. { path: '/widgets', name: 'Widgets', component: Widgets },
  216. { path: '/charts', name: 'Charts', component: Charts },
  217. ];
  218.  
  219. export default routes;
Add Comment
Please, Sign In to add comment