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>
|
||||
@ -33,7 +31,6 @@ class Activity extends React.Component {
|
||||
) : (<Redirect to="/login" />)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
|
@ -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>
|
||||
@ -35,11 +32,4 @@ class AdminMenu extends React.Component {
|
||||
</div>
|
||||
</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>
|
||||
@ -41,7 +39,6 @@ class Admin extends React.Component {
|
||||
) : (<Redirect to="/login" />)}
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
|
@ -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>
|
||||
@ -16,11 +13,4 @@ class AccessDenied extends React.Component {
|
||||
</p>
|
||||
</div>
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
export default connect(
|
||||
state => ({
|
||||
user: state.user,
|
||||
})
|
||||
)(AccessDenied)
|
||||
|
Loading…
Reference in New Issue
Block a user