import React from 'react' import { Helmet } from 'react-helmet' import { connect } from 'react-redux' import FormWithGpx from './ActivityForms/FormWithGpx' import FormWithoutGpx from './ActivityForms/FormWithoutGpx' import { getData } from '../../actions/index' class AddActivity extends React.Component { constructor(props, context) { super(props, context) this.state = { withGpx: true, } } componentDidMount() { this.props.loadSports() } handleRadioChange (changeEvent) { this.setState({ withGpx: changeEvent.target.name === 'withGpx' ? changeEvent.target.value : !changeEvent.target.value }) } render() { const { message, sports } = this.props const { withGpx } = this.state return (
{message}
)}