Client: refactor + minor changes
This commit is contained in:
parent
424df3b721
commit
c314c79f86
@ -9,9 +9,7 @@ import ActivityEdit from './ActivityEdit'
|
||||
import NotFound from './../Others/NotFound'
|
||||
import { isLoggedIn } from '../../utils'
|
||||
|
||||
class Activity extends React.Component {
|
||||
componentDidMount() {}
|
||||
render() {
|
||||
function Activity () {
|
||||
return (
|
||||
<div>
|
||||
<Helmet>
|
||||
@ -34,7 +32,6 @@ class Activity extends React.Component {
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
state => ({
|
||||
|
@ -1,11 +1,8 @@
|
||||
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() {
|
||||
export default function AdminMenu () {
|
||||
return (
|
||||
<div>
|
||||
<Helmet>
|
||||
@ -36,10 +33,3 @@ class AdminMenu extends React.Component {
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
state => ({
|
||||
user: state.user,
|
||||
})
|
||||
)(AdminMenu)
|
||||
|
@ -11,10 +11,8 @@ 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
|
||||
function Admin (props) {
|
||||
const { user } = props
|
||||
return (
|
||||
<div>
|
||||
<Helmet>
|
||||
@ -42,7 +40,6 @@ class Admin extends React.Component {
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
state => ({
|
||||
|
@ -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 !'
|
||||
<div className="card text-center">
|
||||
<div className="card-body">
|
||||
No workouts. {' '}
|
||||
<Link to={{ pathname: '/activities/add' }}>
|
||||
Upload one !
|
||||
</Link>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
{!paginationEnd &&
|
||||
<input
|
||||
|
@ -1,10 +1,7 @@
|
||||
import React from 'react'
|
||||
import { Helmet } from 'react-helmet'
|
||||
import { connect } from 'react-redux'
|
||||
|
||||
class AccessDenied extends React.Component {
|
||||
componentDidMount() {}
|
||||
render() {
|
||||
export default function AccessDenied () {
|
||||
return (
|
||||
<div>
|
||||
<Helmet>
|
||||
@ -17,10 +14,3 @@ class AccessDenied extends React.Component {
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
state => ({
|
||||
user: state.user,
|
||||
})
|
||||
)(AccessDenied)
|
||||
|
Loading…
Reference in New Issue
Block a user