This commit is contained in:
2020-08-22 16:26:09 +02:00
parent 26028445bf
commit 7750829b39
8 changed files with 205 additions and 77 deletions

60
src/screens/Intro.tsx Normal file
View File

@@ -0,0 +1,60 @@
import React from 'react';
import { useHistory } from 'react-router';
import Welcome from './Welcome';
import {
Button,
Space,
} from 'antd';
import {
UploadOutlined,
DownloadOutlined,
KeyOutlined,
} from '@ant-design/icons';
const Thumb: React.FC = ({
title,
Icon,
link,
}) => {
const history = useHistory();
return (
<Button
size="large"
shape="round"
type="link"
icon={<Icon />}
onClick={() => history.push(link)}
>
{title}
</Button>
);
};
const Intro = () => {
return (
<>
<Welcome />
<Space style={{ width: '100%' }} align="center" direction="vertical">
<b>What do you want to do?</b>
<Thumb
title="I want to send a text/file"
link="/send"
Icon={UploadOutlined}
/>
<Thumb
link="/key"
title="I want to receive a file"
Icon={KeyOutlined}
/>
<Thumb
link="/receive"
title="I have received a file"
Icon={DownloadOutlined}
/>
</Space>
</>
);
};
export default Intro;