import router from 'next/router'; import moment from 'moment'; import Card from '@mui/material/Card'; import CardActions from '@mui/material/CardActions'; import CardContent from '@mui/material/CardContent'; import Typography from '@mui/material/Typography'; import Button from '@mui/material/Button'; import {useTranslation} from 'react-i18next'; import {EventEntity} from '../../generated/graphql'; interface Props { event: EventEntity; } const EventCard = ({event}: Props) => { const {t} = useTranslation(); return ( router.push(`/e/${event.attributes.uuid}`, undefined, {shallow: true}) } > {event.attributes.name} {t('event.fields.date')} {moment(event.attributes.date).format('DD/MM/YYYY') || t('event.fields.empty')} {t('event.fields.address')} {event.attributes.address || t('event.fields.empty')} ); }; export default EventCard;