import React from 'react' import { Helmet } from 'react-helmet' import FormWithGpx from './ActivityForms/FormWithGpx' import FormWithoutGpx from './ActivityForms/FormWithoutGpx' export default class ActivityAddEdit extends React.Component { constructor(props, context) { super(props, context) this.state = { withGpx: true, } } handleRadioChange (changeEvent) { this.setState({ withGpx: changeEvent.target.name === 'withGpx' ? changeEvent.target.value : !changeEvent.target.value }) } render() { const { activity, message, sports } = this.props const { withGpx } = this.state return (
mpwo - {activity ? 'Edit a workout' : 'Add a workout'}

{message && ( {message} )}

{activity ? 'Edit a workout' : 'Add a workout'}

{activity ? ( activity.with_gpx ? ( ) : ( ) ) : (
{withGpx ? ( ) : ( )}
)}
) } }