all repos — caroster @ 7f378db1a463f777b274446840456613c75fe547

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

app/src/containers/Dashboard/EmptyDashboard.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 {useHistory} from 'react-router-dom';
 9export const EmptyDashboard = () => {
10  const {t} = useTranslation();
11  const history = useHistory();
12  const goNewEvent = history.push.bind(undefined, '/new');
13  return (
14    <Card>
15      <CardContent>
16        <Typography gutterBottom variant="h5" component="h1">
17          {t('dashboard.noEvent.title')}
18        </Typography>
19        <Typography
20          variant="body1"
21          gutterBottom
22          dangerouslySetInnerHTML={{
23            __html: t('dashboard.noEvent.text_html'),
24          }}
25        />
26      </CardContent>
27      <CardActions>
28        <Button
29          onClick={() => goNewEvent()}
30          variant="contained"
31          color="primary"
32        >
33          {t('dashboard.noEvent.create_event')}
34        </Button>
35      </CardActions>
36    </Card>
37  );
38};