all repos — caroster @ 943931a5ccd92069bfad1e8b2e4310b237797bc6

[Octree] Group carpool to your event https://caroster.io

app/src/containers/DashboardEvents/EventCard.js (view raw)

 1import React from 'react';
 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';
 8import {Link} from 'react-router-dom';
 9
10const EventCard = ({event}) => {
11  const {t} = useTranslation();
12  return (
13    <Card>
14      <CardContent>
15        <Typography gutterBottom variant="h6" component="h3">
16          {event.name}
17        </Typography>
18        <Typography variant="body1">{t('event.fields.starts_on')}</Typography>
19        <Typography variant="body2" gutterBottom>
20          {event.date || t('event.fields.empty')}
21        </Typography>
22        <Typography variant="body1">{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 to={`/e/${event.id}`}>
29          <Button>{t('dashboard.actions.see_event')}</Button>
30        </Link>
31      </CardActions>
32    </Card>
33  );
34};
35
36export default EventCard;