diff --git a/mpwo_client/src/components/Admin/index.jsx b/mpwo_client/src/components/Admin/index.jsx
new file mode 100644
index 00000000..ec171e37
--- /dev/null
+++ b/mpwo_client/src/components/Admin/index.jsx
@@ -0,0 +1,30 @@
+import React from 'react'
+import { Helmet } from 'react-helmet'
+import { connect } from 'react-redux'
+
+import AccessDenied from './../Others/AccessDenied'
+
+class Admin extends React.Component {
+ componentDidMount() {}
+ render() {
+ const { user } = this.props
+ return (
+
+
+ mpwo - Admin
+
+ {!user.isAdmin ? (
+
+ ) : (
+
Admin
+ )}
+
+ )
+ }
+}
+
+export default connect(
+ state => ({
+ user: state.user,
+ })
+)(Admin)
diff --git a/mpwo_client/src/components/App.jsx b/mpwo_client/src/components/App.jsx
index 7ac929c9..666df375 100644
--- a/mpwo_client/src/components/App.jsx
+++ b/mpwo_client/src/components/App.jsx
@@ -2,10 +2,11 @@ import React from 'react'
import { Redirect, Route, Switch } from 'react-router-dom'
import './App.css'
+import Admin from './Admin'
import Dashboard from './Dashboard'
import Logout from './User/Logout'
import NavBar from './NavBar'
-import NotFound from './NotFound'
+import NotFound from './Others/NotFound'
import Profile from './User/Profile'
import ProfileEdit from './User/ProfileEdit'
import UserForm from './User/UserForm'
@@ -82,6 +83,18 @@ export default class App extends React.Component {
)
)}
/>
+ (
+ isLoggedIn() ? (
+
+ ) : (
+
+ )
+ )}
+ />
diff --git a/mpwo_client/src/components/Dashboard/index.jsx b/mpwo_client/src/components/Dashboard/index.jsx
index b922fb24..cfaf3bfb 100644
--- a/mpwo_client/src/components/Dashboard/index.jsx
+++ b/mpwo_client/src/components/Dashboard/index.jsx
@@ -2,7 +2,7 @@ import React from 'react'
import { Helmet } from 'react-helmet'
import { connect } from 'react-redux'
-class Logout extends React.Component {
+class DashBoard extends React.Component {
componentDidMount() {}
render() {
return (
@@ -20,4 +20,4 @@ export default connect(
state => ({
user: state.user,
})
-)(Logout)
+)(DashBoard)
diff --git a/mpwo_client/src/components/NavBar/index.jsx b/mpwo_client/src/components/NavBar/index.jsx
index 153b4ad5..51343ecb 100644
--- a/mpwo_client/src/components/NavBar/index.jsx
+++ b/mpwo_client/src/components/NavBar/index.jsx
@@ -33,6 +33,18 @@ function NavBar (props) {
Dashboard
+ {props.user.isAdmin && (
+
+
+ Admin
+
+
+ )}