import React from 'react' import { Helmet } from 'react-helmet' import { connect } from 'react-redux' import FormWithGpx from './ActivityForms/FormWithGpx' import { getData } from '../../actions/index' class AddActivity extends React.Component { componentDidMount() { this.props.loadSports() } render() { const { message, sports } = this.props return (
mpwo - Add an activity

{message && ( {message} )}

Add a sport

) } } export default connect( state => ({ message: state.message, sports: state.sports.data, user: state.user, }), dispatch => ({ loadSports: () => { dispatch(getData('sports')) }, }) )(AddActivity)