frontend/containers/DashboardEvents/EventCard.js (view raw)
1import Link from 'next/link';
2import Card from '@material-ui/core/Card';
3import CardActions from '@material-ui/core/CardActions';
4import CardContent from '@material-ui/core/CardContent';
5import Typography from '@material-ui/core/Typography';
6import Button from '@material-ui/core/Button';
7import {useTranslation} from 'react-i18next';
8
9const EventCard = ({event}) => {
10 const {t} = useTranslation();
11
12 return (
13 <Card>
14 <CardContent>
15 <Typography gutterBottom variant="h6" component="h3">
16 {event.name}
17 </Typography>
18 <Typography variant="overline">{t('event.fields.date')}</Typography>
19 <Typography variant="body2" gutterBottom>
20 {event.date || t('event.fields.empty')}
21 </Typography>
22 <Typography variant="overline">{t('event.fields.address')}</Typography>
23 <Typography variant="body2" gutterBottom>
24 {event.address || t('event.fields.empty')}
25 </Typography>
26 </CardContent>
27 <CardActions>
28 <Link href={`/e/${event.uuid}`}>
29 <Button color="primary">{t('dashboard.actions.see_event')}</Button>
30 </Link>
31 </CardActions>
32 </Card>
33 );
34};
35
36export default EventCard;