This commit is contained in:
2020-08-22 14:56:41 +02:00
parent 79d89f266a
commit 26028445bf
16 changed files with 315 additions and 176 deletions

View File

@@ -1,13 +1,13 @@
import React, { useContext, useEffect } from 'react';
import { Divider } from 'antd';
import { useHistory } from 'react-router';
import Add from '../components/Add';
import Add from '../components/encrypt/Add';
import FileList from '../components/FileList';
import EncryptionContext from '../contexts/Encryption';
const Encrypt: React.FC = () => {
const history = useHistory();
const { files } = useContext(EncryptionContext);
const { files, deleteFile } = useContext(EncryptionContext);
useEffect(() => {
if (localStorage.getItem('welcome') !== 'seen') {
history.replace('/welcome');
@@ -20,7 +20,14 @@ const Encrypt: React.FC = () => {
{Object.keys(files).length > 0 && (
<>
<Divider>Files</Divider>
<FileList />
<FileList
files={files}
deleteFile={deleteFile}
/>
<Divider />
<i style={{ textAlign: 'center', paddingTop: '10px', display: 'block', fontSize: 12 }}>
Note: files are not send to me, you still have to download the encrypted files and send it to me.
</i>
</>
)}
</>