diff --git a/mpwo_client/src/components/Admin/AdminMenu.jsx b/mpwo_client/src/components/Admin/AdminMenu.jsx
new file mode 100644
index 00000000..e6357855
--- /dev/null
+++ b/mpwo_client/src/components/Admin/AdminMenu.jsx
@@ -0,0 +1,43 @@
+import React from 'react'
+import { Helmet } from 'react-helmet'
+import { connect } from 'react-redux'
+import { Link } from 'react-router-dom'
+
+class AdminMenu extends React.Component {
+ componentDidMount() {}
+ render() {
+ return (
+
+
+ mpwo - Admin
+
+
Administration
+
+
+ )
+ }
+}
+
+export default connect(
+ state => ({
+ user: state.user,
+ })
+)(AdminMenu)
diff --git a/mpwo_client/src/components/Admin/AdminSports.jsx b/mpwo_client/src/components/Admin/AdminSports.jsx
new file mode 100644
index 00000000..84415195
--- /dev/null
+++ b/mpwo_client/src/components/Admin/AdminSports.jsx
@@ -0,0 +1,23 @@
+import React from 'react'
+import { Helmet } from 'react-helmet'
+import { connect } from 'react-redux'
+
+class AdminSports extends React.Component {
+ componentDidMount() {}
+ render() {
+ return (
+
+
+ mpwo - Admin
+
+
Administration - Sports
+
+ )
+ }
+}
+
+export default connect(
+ state => ({
+ user: state.user,
+ })
+)(AdminSports)
diff --git a/mpwo_client/src/components/Admin/index.jsx b/mpwo_client/src/components/Admin/index.jsx
index ec171e37..73285662 100644
--- a/mpwo_client/src/components/Admin/index.jsx
+++ b/mpwo_client/src/components/Admin/index.jsx
@@ -1,8 +1,13 @@
import React from 'react'
import { Helmet } from 'react-helmet'
import { connect } from 'react-redux'
+import { Redirect, Route, Switch } from 'react-router-dom'
+import AdminMenu from './AdminMenu'
+import AdminSports from './AdminSports'
import AccessDenied from './../Others/AccessDenied'
+import NotFound from './../Others/NotFound'
+import { isLoggedIn } from '../../utils'
class Admin extends React.Component {
componentDidMount() {}
@@ -13,11 +18,17 @@ class Admin extends React.Component {
mpwo - Admin
- {!user.isAdmin ? (
+ {isLoggedIn() ? (
+ user.isAdmin ? (
+
+
+
+
+
+ ) : (
- ) : (
- Admin
- )}
+ )
+ ) : ()}
)
}
diff --git a/mpwo_client/src/components/App.jsx b/mpwo_client/src/components/App.jsx
index 666df375..8d61d530 100644
--- a/mpwo_client/src/components/App.jsx
+++ b/mpwo_client/src/components/App.jsx
@@ -83,18 +83,7 @@ export default class App extends React.Component {
)
)}
/>
- (
- isLoggedIn() ? (
-
- ) : (
-
- )
- )}
- />
+