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 NotFound from './../Others/NotFound'
|
||||||
import { isLoggedIn } from '../../utils'
|
import { isLoggedIn } from '../../utils'
|
||||||
|
|
||||||
class Activity extends React.Component {
|
function Activity () {
|
||||||
componentDidMount() {}
|
|
||||||
render() {
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Helmet>
|
<Helmet>
|
||||||
@ -33,7 +31,6 @@ class Activity extends React.Component {
|
|||||||
) : (<Redirect to="/login" />)}
|
) : (<Redirect to="/login" />)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
|
@ -1,11 +1,8 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { Helmet } from 'react-helmet'
|
import { Helmet } from 'react-helmet'
|
||||||
import { connect } from 'react-redux'
|
|
||||||
import { Link } from 'react-router-dom'
|
import { Link } from 'react-router-dom'
|
||||||
|
|
||||||
class AdminMenu extends React.Component {
|
export default function AdminMenu () {
|
||||||
componentDidMount() {}
|
|
||||||
render() {
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Helmet>
|
<Helmet>
|
||||||
@ -35,11 +32,4 @@ class AdminMenu extends React.Component {
|
|||||||
</div>
|
</div>
|
||||||
</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 NotFound from './../Others/NotFound'
|
||||||
import { isLoggedIn } from '../../utils'
|
import { isLoggedIn } from '../../utils'
|
||||||
|
|
||||||
class Admin extends React.Component {
|
function Admin (props) {
|
||||||
componentDidMount() {}
|
const { user } = props
|
||||||
render() {
|
|
||||||
const { user } = this.props
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Helmet>
|
<Helmet>
|
||||||
@ -41,7 +39,6 @@ class Admin extends React.Component {
|
|||||||
) : (<Redirect to="/login" />)}
|
) : (<Redirect to="/login" />)}
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(
|
export default connect(
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { Helmet } from 'react-helmet'
|
import { Helmet } from 'react-helmet'
|
||||||
import { connect } from 'react-redux'
|
import { connect } from 'react-redux'
|
||||||
|
import { Link } from 'react-router-dom'
|
||||||
|
|
||||||
import ActivityCard from './ActivityCard'
|
import ActivityCard from './ActivityCard'
|
||||||
import Calendar from './../Others/Calendar'
|
import Calendar from './../Others/Calendar'
|
||||||
@ -56,7 +57,14 @@ class DashBoard extends React.Component {
|
|||||||
sports={sports}
|
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 &&
|
{!paginationEnd &&
|
||||||
<input
|
<input
|
||||||
|
@ -1,10 +1,7 @@
|
|||||||
import React from 'react'
|
import React from 'react'
|
||||||
import { Helmet } from 'react-helmet'
|
import { Helmet } from 'react-helmet'
|
||||||
import { connect } from 'react-redux'
|
|
||||||
|
|
||||||
class AccessDenied extends React.Component {
|
export default function AccessDenied () {
|
||||||
componentDidMount() {}
|
|
||||||
render() {
|
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
<Helmet>
|
<Helmet>
|
||||||
@ -16,11 +13,4 @@ class AccessDenied extends React.Component {
|
|||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
)
|
)
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export default connect(
|
|
||||||
state => ({
|
|
||||||
user: state.user,
|
|
||||||
})
|
|
||||||
)(AccessDenied)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user