Skip to content

Commit 05acbe5

Browse files
committed
Setup administration module
1 parent 4b3e83f commit 05acbe5

File tree

4 files changed

+28
-3
lines changed

4 files changed

+28
-3
lines changed

src/Administration/Administration.js

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
import React from 'react'
2+
// import { Route } from 'react-router-dom'
3+
import PropTypes from 'prop-types'
4+
5+
const Administration = ({ match }) => {
6+
return (
7+
<div>
8+
{/* <Route path={`${match.path}/login`} component={Login} /> */}
9+
Hello Administration
10+
</div>
11+
)
12+
}
13+
14+
Administration.propTypes = {}
15+
16+
export default Administration

src/Administration/index.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
1+
import Administration from './Administration'
2+
13
const AdministrationModule = {
24
init() {},
35
}
6+
export { Administration }
47

58
export default AdministrationModule

src/AppRouter.js

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import config from './_config'
55

66
import DashboardLayout from '_layouts/DashboardLayout'
77
import { Auth } from './Auth'
8+
import { Administration } from './Administration'
89
import { Dashboard } from './Dashboard'
910

1011
// Use different router type depending on configuration
@@ -16,7 +17,12 @@ const AppRouter = () => (
1617
<Switch>
1718
{/* <Route exact path="/" render={() => <Redirect to="/sales/dashboard" />} /> */}
1819
<Route path="/auth" component={Auth} />
19-
<RouteWithLayout path={`/`} component={Dashboard} layout={DashboardLayout} />
20+
<RouteWithLayout exact path={`/`} component={Dashboard} layout={DashboardLayout} />
21+
<RouteWithLayout
22+
path={`/administration`}
23+
component={Administration}
24+
layout={DashboardLayout}
25+
/>
2026
{/* <Route path="/" component={DashboardLayout} /> */}
2127
{/* <RoutePrivate path="/" component={LoggedInRouter} /> */}
2228
</Switch>

src/_common/AppSidebar/SidebarNav/SidebarNav.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,12 +71,12 @@ const SidebarNav = props => {
7171
items: [
7272
{
7373
name: 'All Organizations',
74-
link: '/admin/accounts',
74+
link: '/administration/accounts',
7575
Icon: IconAccount,
7676
},
7777
{
7878
name: 'All Users',
79-
link: '/admin/users',
79+
link: '/administration/users',
8080
Icon: IconGroup,
8181
},
8282
],

0 commit comments

Comments
 (0)