Merge pull request #3 from Ninja3047/master

fix typescript errors, add tsconfig.json
This commit is contained in:
Ninja3047 2022-07-27 22:08:59 -04:00 committed by GitHub
commit 7b7d119831
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -25,15 +25,13 @@ require('highlightjs-line-numbers.js');
const FileForm = () => {
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
let file = event.target.files![0];
const fr = new FileReader();
fr.onload = (e) => {
const { result } = e.target;
if (result instanceof ArrayBuffer) {
let data = new Uint8Array(result);
fr.onload = (_e) => {
let data = new Uint8Array(fr.result as ArrayBuffer);
encrypt_array_buffer(data);
}
}
fr.readAsArrayBuffer((event.target as HTMLInputElement).files[0]);
fr.readAsArrayBuffer(file);
}
return (