import React from 'react' import { Helmet } from 'react-helmet' import { connect } from 'react-redux' import ActivityMap from './ActivityMap' import { getData } from '../../actions/index' class ActivityDisplay extends React.Component { componentDidMount() { this.props.loadActivity( this.props.location.pathname.replace('/activities/', '') ) } render() { const { activities, message, sports } = this.props const [activity] = activities return (
mpwo - Activity

Activity

{message ? ( {message} ) : (
{activity && sports.length > 0 && (
{sports.filter(sport => sport.id === activity.sport_id) .map(sport => sport.label)} -{' '} {activity.activity_date}