diff --git a/mpwo_client/src/components/Activity/index.jsx b/mpwo_client/src/components/Activity/index.jsx index 3dfa1729..91ba8f40 100644 --- a/mpwo_client/src/components/Activity/index.jsx +++ b/mpwo_client/src/components/Activity/index.jsx @@ -9,31 +9,28 @@ import ActivityEdit from './ActivityEdit' import NotFound from './../Others/NotFound' import { isLoggedIn } from '../../utils' -class Activity extends React.Component { - componentDidMount() {} - render() { - return ( -
- - mpwo - Admin - - {isLoggedIn() ? ( - - - - - - - ) : ()} -
- ) - } +function Activity () { + return ( +
+ + mpwo - Admin + + {isLoggedIn() ? ( + + + + + + + ) : ()} +
+ ) } export default connect( diff --git a/mpwo_client/src/components/Admin/Sports/AdminMenu.jsx b/mpwo_client/src/components/Admin/Sports/AdminMenu.jsx index df7480a6..66a7deb4 100644 --- a/mpwo_client/src/components/Admin/Sports/AdminMenu.jsx +++ b/mpwo_client/src/components/Admin/Sports/AdminMenu.jsx @@ -1,45 +1,35 @@ 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

-
-
-
-
-
-
    -
  • - - Sports - -
  • -
-
+export default function AdminMenu () { + return ( +
+ + mpwo - Admin + +

Administration

+
+
+
+
+
+
    +
  • + + Sports + +
  • +
-
+
- ) - } +
+ ) } - -export default connect( - state => ({ - user: state.user, - }) -)(AdminMenu) diff --git a/mpwo_client/src/components/Admin/index.jsx b/mpwo_client/src/components/Admin/index.jsx index 3fc55024..98a76fb2 100644 --- a/mpwo_client/src/components/Admin/index.jsx +++ b/mpwo_client/src/components/Admin/index.jsx @@ -11,37 +11,34 @@ import AccessDenied from './../Others/AccessDenied' import NotFound from './../Others/NotFound' import { isLoggedIn } from '../../utils' -class Admin extends React.Component { - componentDidMount() {} - render() { - const { user } = this.props - return ( -
- - mpwo - Admin - - {isLoggedIn() ? ( - user.isAdmin ? ( - - - - - - - - ) : ( - - ) - ) : ()} -
- ) - } +function Admin (props) { + const { user } = props + return ( +
+ + mpwo - Admin + + {isLoggedIn() ? ( + user.isAdmin ? ( + + + + + + + + ) : ( + + ) + ) : ()} +
+ ) } export default connect( diff --git a/mpwo_client/src/components/Dashboard/index.jsx b/mpwo_client/src/components/Dashboard/index.jsx index 8da14004..69681f28 100644 --- a/mpwo_client/src/components/Dashboard/index.jsx +++ b/mpwo_client/src/components/Dashboard/index.jsx @@ -1,6 +1,7 @@ import React from 'react' import { Helmet } from 'react-helmet' import { connect } from 'react-redux' +import { Link } from 'react-router-dom' import ActivityCard from './ActivityCard' import Calendar from './../Others/Calendar' @@ -56,7 +57,14 @@ class DashBoard extends React.Component { sports={sports} />) )) : ( - 'No activities. Upload one !' +
+
+ No workouts. {' '} + + Upload one ! + +
+
)} {!paginationEnd && - - mpwo - Access denied - -

Access denied

-

- {'You don\'t have permissions to access this page.'} -

-
- ) - } +export default function AccessDenied () { + return ( +
+ + mpwo - Access denied + +

Access denied

+

+ {'You don\'t have permissions to access this page.'} +

+
+ ) } - -export default connect( - state => ({ - user: state.user, - }) -)(AccessDenied)