Fix decrypt

This commit is contained in:
2020-08-22 19:17:53 +02:00
parent ab4fc8e18a
commit 8cc811fa3f
7 changed files with 18 additions and 12 deletions

View File

@@ -22,7 +22,7 @@ const AddFile: React.FC = () => {
const { addFile } = useContext(DecryptionContext);
const onDrop = useCallback(acceptedFiles => {
acceptedFiles.forEach(addFile);
}, [])
}, [addFile])
const {getRootProps, getInputProps} = useDropzone({ onDrop });
return (
<DropWrapper {...getRootProps()}>

View File

@@ -4,7 +4,7 @@ import { FileOutlined, FileTextOutlined } from '@ant-design/icons';
import AddText from './AddText';
import AddFile from './AddFile';
const DEFAULT_VALUE = 'text';
const DEFAULT_VALUE = 'file';
const Add: React.FC = () => {
const [type, setType] = useState<'file' | 'text'>(DEFAULT_VALUE);

View File

@@ -22,7 +22,7 @@ const AddFile: React.FC = () => {
const { addFile } = useContext(EncryptionContext);
const onDrop = useCallback(acceptedFiles => {
acceptedFiles.forEach(addFile);
}, [])
}, [addFile])
const {getRootProps, getInputProps} = useDropzone({ onDrop });
return (
<DropWrapper {...getRootProps()}>