chore: clean-up
This commit is contained in:
parent
dcd090534b
commit
5cee527391
@ -1,45 +0,0 @@
|
||||
import React, { Suspense } from 'react'
|
||||
import { Redirect, Route, Switch } from 'react-router-dom'
|
||||
import { CContainer } from '@coreui/react'
|
||||
|
||||
// routes config
|
||||
import routes from '../routes'
|
||||
|
||||
const loading = (
|
||||
<div className="pt-3 text-center">
|
||||
<div className="sk-spinner sk-spinner-pulse"></div>
|
||||
</div>
|
||||
)
|
||||
|
||||
const TheContent = () => {
|
||||
return (
|
||||
<main className="c-main">
|
||||
<CContainer lg>
|
||||
<Suspense fallback={loading}>
|
||||
<Switch>
|
||||
{routes.map((route, idx) => {
|
||||
return (
|
||||
route.component && (
|
||||
<Route
|
||||
key={idx}
|
||||
path={route.path}
|
||||
exact={route.exact}
|
||||
name={route.name}
|
||||
render={(props) => (
|
||||
<>
|
||||
<route.component {...props} />
|
||||
</>
|
||||
)}
|
||||
/>
|
||||
)
|
||||
)
|
||||
})}
|
||||
<Redirect from="/" to="/dashboard" />
|
||||
</Switch>
|
||||
</Suspense>
|
||||
</CContainer>
|
||||
</main>
|
||||
)
|
||||
}
|
||||
|
||||
export default React.memo(TheContent)
|
@ -1,321 +0,0 @@
|
||||
import React from 'react'
|
||||
import CIcon from '@coreui/icons-react'
|
||||
import { NavLink } from 'react-router-dom'
|
||||
|
||||
const _nav = [
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Dashboard',
|
||||
to: '/dashboard',
|
||||
icon: <CIcon name="cil-speedometer" customClasses="nav-icon" />,
|
||||
badge: {
|
||||
color: 'info',
|
||||
text: 'NEW',
|
||||
},
|
||||
},
|
||||
{
|
||||
_component: 'CNavTitle',
|
||||
anchor: 'Theme',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Colors',
|
||||
to: '/theme/colors',
|
||||
icon: <CIcon name="cil-drop" customClasses="nav-icon" />,
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Typography',
|
||||
to: '/theme/typography',
|
||||
icon: <CIcon name="cil-pencil" customClasses="nav-icon" />,
|
||||
},
|
||||
{
|
||||
_component: 'CNavTitle',
|
||||
anchor: 'Components',
|
||||
},
|
||||
{
|
||||
_component: 'CNavGroup',
|
||||
as: NavLink,
|
||||
anchor: 'Base',
|
||||
to: '/to',
|
||||
icon: <CIcon name="cil-puzzle" customClasses="nav-icon" />,
|
||||
items: [
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Accordion',
|
||||
to: '/base/accordion',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Breadcrumb',
|
||||
to: '/base/breadcrumbs',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Cards',
|
||||
to: '/base/cards',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Carousel',
|
||||
to: '/base/carousels',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Collapse',
|
||||
to: '/base/collapses',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'List group',
|
||||
to: '/base/list-groups',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Navs & Tabs',
|
||||
to: '/base/navs',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Pagination',
|
||||
to: '/base/paginations',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Popovers',
|
||||
to: '/base/popovers',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Progress',
|
||||
to: '/base/progress',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Spinners',
|
||||
to: '/base/spinners',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Tables',
|
||||
to: '/base/tables',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Tooltips',
|
||||
to: '/base/tooltips',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
_component: 'CNavGroup',
|
||||
anchor: 'Buttons',
|
||||
icon: <CIcon name="cil-cursor" customClasses="nav-icon" />,
|
||||
items: [
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Buttons',
|
||||
to: '/buttons/buttons',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Buttons groups',
|
||||
to: '/buttons/button-groups',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Dropdowns',
|
||||
to: '/buttons/dropdowns',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
_component: 'CNavGroup',
|
||||
anchor: 'Forms',
|
||||
icon: <CIcon name="cil-notes" customClasses="nav-icon" />,
|
||||
items: [
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Form Control',
|
||||
to: '/forms/form-control',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Select',
|
||||
to: '/forms/select',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Checks & Radios',
|
||||
to: '/forms/checks-radios',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Range',
|
||||
to: '/forms/range',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Input Group',
|
||||
to: '/forms/input-group',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Floating Labels',
|
||||
to: '/forms/floating-labels',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Layout',
|
||||
to: '/forms/layout',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Validation',
|
||||
to: '/forms/validation',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Charts',
|
||||
to: '/charts',
|
||||
icon: <CIcon name="cil-chart-pie" customClasses="nav-icon" />,
|
||||
},
|
||||
{
|
||||
_component: 'CNavGroup',
|
||||
anchor: 'Icons',
|
||||
icon: <CIcon name="cil-star" customClasses="nav-icon" />,
|
||||
items: [
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'CoreUI Free',
|
||||
to: '/icons/coreui-icons',
|
||||
badge: {
|
||||
color: 'success',
|
||||
text: 'NEW',
|
||||
},
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'CoreUI Flags',
|
||||
to: '/icons/flags',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'CoreUI Brands',
|
||||
to: '/icons/brands',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
_component: 'CNavGroup',
|
||||
anchor: 'Notifications',
|
||||
icon: <CIcon name="cil-bell" customClasses="nav-icon" />,
|
||||
items: [
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Alerts',
|
||||
to: '/notifications/alerts',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Badges',
|
||||
to: '/notifications/badges',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Modal',
|
||||
to: '/notifications/modals',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Toasts',
|
||||
to: '/notifications/toasts',
|
||||
},
|
||||
],
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Widgets',
|
||||
to: '/widgets',
|
||||
icon: <CIcon name="cil-calculator" customClasses="nav-icon" />,
|
||||
badge: {
|
||||
color: 'info',
|
||||
text: 'NEW',
|
||||
},
|
||||
},
|
||||
{
|
||||
_component: 'CNavTitle',
|
||||
anchor: 'Extras',
|
||||
},
|
||||
{
|
||||
_component: 'CNavGroup',
|
||||
anchor: 'Pages',
|
||||
icon: <CIcon name="cil-star" customClasses="nav-icon" />,
|
||||
items: [
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Login',
|
||||
to: '/login',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Register',
|
||||
to: '/register',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Error 404',
|
||||
to: '/404',
|
||||
},
|
||||
{
|
||||
_component: 'CNavItem',
|
||||
as: NavLink,
|
||||
anchor: 'Error 500',
|
||||
to: '/500',
|
||||
},
|
||||
],
|
||||
},
|
||||
]
|
||||
|
||||
export default _nav
|
@ -1,17 +0,0 @@
|
||||
import AppBreadcrumb from '../components/AppBreadcrumb'
|
||||
import TheContent from './TheContent'
|
||||
import AppFooter from '../components/AppFooter'
|
||||
import AppHeader from '../components/AppHeader'
|
||||
import AppHeaderDropdown from '../components/header/AppHeaderDropdown'
|
||||
import DefaultLayout from '../layout/DefaultLayout'
|
||||
import AppSidebar from '../components/AppSidebar'
|
||||
|
||||
export {
|
||||
AppBreadcrumb,
|
||||
TheContent,
|
||||
AppFooter,
|
||||
AppHeader,
|
||||
AppHeaderDropdown,
|
||||
DefaultLayout,
|
||||
AppSidebar,
|
||||
}
|
@ -1,61 +0,0 @@
|
||||
/*
|
||||
* required polyfills
|
||||
*/
|
||||
|
||||
/** IE9, IE10 and IE11 requires all of the following polyfills. **/
|
||||
// import "core-js";
|
||||
// import 'core-js/features/symbol'
|
||||
// import 'core-js/features/object'
|
||||
// import 'core-js/features/function'
|
||||
// import 'core-js/features/parse-int'
|
||||
// import 'core-js/features/parse-float'
|
||||
// import 'core-js/features/number'
|
||||
// import 'core-js/features/math'
|
||||
// import 'core-js/features/string'
|
||||
// import 'core-js/features/date'
|
||||
// import 'core-js/features/array'
|
||||
// import 'core-js/features/regexp'
|
||||
// import 'core-js/features/map'
|
||||
// import 'core-js/features/weak-map'
|
||||
// import 'core-js/features/set'
|
||||
// import 'core-js/features/set/map';
|
||||
|
||||
/** IE10 and IE11 requires the following for the Reflect API. */
|
||||
// import 'core-js/features/reflect';
|
||||
|
||||
/** Evergreen browsers require these. **/
|
||||
// Used for reflect-metadata in JIT. If you use AOT (and only Angular decorators), you can remove.
|
||||
// import 'core-js/features/reflect'
|
||||
|
||||
// CustomEvent() constructor functionality in IE9, IE10, IE11
|
||||
;(function () {
|
||||
if (typeof window.CustomEvent === 'function') return false
|
||||
|
||||
function CustomEvent(event, params) {
|
||||
params = params || { bubbles: false, cancelable: false, detail: undefined }
|
||||
var evt = document.createEvent('CustomEvent')
|
||||
evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail)
|
||||
return evt
|
||||
}
|
||||
|
||||
CustomEvent.prototype = window.Event.prototype
|
||||
|
||||
window.CustomEvent = CustomEvent
|
||||
})()
|
||||
|
||||
if (!Element.prototype.matches) {
|
||||
Element.prototype.matches =
|
||||
Element.prototype.msMatchesSelector || Element.prototype.webkitMatchesSelector
|
||||
}
|
||||
|
||||
if (!Element.prototype.closest) {
|
||||
Element.prototype.closest = function (s) {
|
||||
var el = this
|
||||
|
||||
do {
|
||||
if (Element.prototype.matches.call(el, s)) return el
|
||||
el = el.parentElement || el.parentNode
|
||||
} while (el !== null && el.nodeType === 1)
|
||||
return null
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user