import { format } from 'date-fns' import React from 'react' import { Link } from 'react-router-dom' import { apiUrl } from '../../utils' export default function ActivityCard (props) { const { activity, sports } = props return (
{sports.filter(sport => sport.id === activity.sport_id) .map(sport => sport.label)} -{' '} {format(activity.activity_date, 'DD/MM/YYYY HH:mm')}
{activity.map && (
Map
)}