all repos — caroster @ d39c62502733b99d1ca3960948375a4e251e025f

[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="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        <Button component={Link} to={`/e/${event.id}`} color="primary">
31          {t('dashboard.actions.see_event')}
32        </Button>
33      </CardActions>
34    </Card>
35  );
36};
37
38export default EventCard;