import React from 'react' import { Helmet } from 'react-helmet' import { connect } from 'react-redux' import { getData } from '../../actions/index' class AdminSports extends React.Component { componentDidMount() { this.props.loadSport() } render() { const { sports } = this.props return (
mpwo - Admin

Administration - Sports

    {sports.map(sport => (
  • {sport.label}
  • ))}
) } } export default connect( state => ({ sports: state.sports.data, user: state.user, }), dispatch => ({ loadSport: () => { dispatch(getData('sports')) }, }) )(AdminSports)