all repos — caroster @ a69dc08b4f89eca3499b1321ae3077f0846ae591

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

frontend/containers/DashboardEvents/EventCard.js (view raw)

 1import Card from '@material-ui/core/Card';
 2import CardActions from '@material-ui/core/CardActions';
 3import CardContent from '@material-ui/core/CardContent';
 4import Typography from '@material-ui/core/Typography';
 5import Button from '@material-ui/core/Button';
 6import {useTranslation} from 'react-i18next';
 7import Link from 'next/link';
 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">
19          {t('event.fields.starts_on')}
20        </Typography>
21        <Typography variant="body2" gutterBottom>
22          {event.date || t('event.fields.empty')}
23        </Typography>
24        <Typography variant="overline">{t('event.fields.address')}</Typography>
25        <Typography variant="body2" gutterBottom>
26          {event.address || t('event.fields.empty')}
27        </Typography>
28      </CardContent>
29      <CardActions>
30        <Link href={`/e/${event.uuid}`}>
31          <Button color="primary">{t('dashboard.actions.see_event')}</Button>
32        </Link>
33      </CardActions>
34    </Card>
35  );
36};
37
38export default EventCard;