Skip to content

Commit 9ce3f5b

Browse files
Samuel  TranSamuel  Tran
authored andcommitted
Migrated to typescript for buttoncontainer. Kept ts no check. Still JSX.element error on tutorial rendering.
kept ts nocheck for that error but needs to pass Travis CI. Working on error
1 parent 79ed892 commit 9ce3f5b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/app/containers/ButtonsContainer.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,18 +31,18 @@ function exportHandler(snapshots: []) {
3131
URL.revokeObjectURL(fileDownload.href);
3232
}
3333

34-
function importHandler(dispatch: (a: any) => void) {
34+
function importHandler(dispatch: (a: unknown) => void) {
3535
const fileUpload = document.createElement('input');
3636
fileUpload.setAttribute('type', 'file');
3737

38-
fileUpload.onchange = () => {
38+
fileUpload.onchange = (e) => {
3939
const reader = new FileReader();
4040
reader.onload = () => {
4141
const test = reader.result.toString();
4242
return dispatch(importSnapshots(JSON.parse(test)));
4343
};
44-
if (event.target.hasOwnProperty('files')) {
45-
const eventFiles: any = event.target;
44+
if (e.target.hasOwnProperty('files')) {
45+
const eventFiles: unknown = e.target;
4646
reader.readAsText(eventFiles.files[0]);
4747
}
4848
};

0 commit comments

Comments
 (0)