Merge pull request #3 from Ninja3047/master
fix typescript errors, add tsconfig.json
This commit is contained in:
commit
7b7d119831
1 changed files with 5 additions and 7 deletions
|
@ -25,15 +25,13 @@ require('highlightjs-line-numbers.js');
|
||||||
|
|
||||||
const FileForm = () => {
|
const FileForm = () => {
|
||||||
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
const handleChange = (event: React.ChangeEvent<HTMLInputElement>) => {
|
||||||
|
let file = event.target.files![0];
|
||||||
const fr = new FileReader();
|
const fr = new FileReader();
|
||||||
fr.onload = (e) => {
|
fr.onload = (_e) => {
|
||||||
const { result } = e.target;
|
let data = new Uint8Array(fr.result as ArrayBuffer);
|
||||||
if (result instanceof ArrayBuffer) {
|
|
||||||
let data = new Uint8Array(result);
|
|
||||||
encrypt_array_buffer(data);
|
encrypt_array_buffer(data);
|
||||||
}
|
}
|
||||||
}
|
fr.readAsArrayBuffer(file);
|
||||||
fr.readAsArrayBuffer((event.target as HTMLInputElement).files[0]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
|
|
Loading…
Reference in a new issue