Fix ESLint issues
This commit is contained in:
@ -38,7 +38,7 @@ export function BackupRoute(): React.ReactElement {
|
||||
}
|
||||
importWarning="Existing data will be COMPLETELY ERASED, before starting import!"
|
||||
exportURL={BackupApi.ZIPExportURL}
|
||||
onImport={BackupApi.ZIPImport}
|
||||
onImport={(f) => BackupApi.ZIPImport(f)}
|
||||
acceptedFiles={"application/zip"}
|
||||
/>
|
||||
|
||||
@ -62,7 +62,7 @@ export function BackupRoute(): React.ReactElement {
|
||||
}
|
||||
importWarning="Existing data will not be touched, movement will be inserted in newly created accounts."
|
||||
exportURL={BackupApi.FinancesManagerExportURL}
|
||||
onImport={BackupApi.FinancesManagerImport}
|
||||
onImport={(f) => BackupApi.FinancesManagerImport(f)}
|
||||
/>
|
||||
|
||||
{/* Excel */}
|
||||
@ -100,9 +100,11 @@ function ImportExportModal(p: {
|
||||
fileEl.click();
|
||||
|
||||
// Wait for a file to be chosen
|
||||
await new Promise((res, _rej) =>
|
||||
fileEl.addEventListener("change", () => res(null))
|
||||
);
|
||||
await new Promise((res) => {
|
||||
fileEl.addEventListener("change", () => {
|
||||
res(null);
|
||||
});
|
||||
});
|
||||
|
||||
if (fileEl.files?.length === 0) return;
|
||||
|
||||
|
Reference in New Issue
Block a user