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