fix linting

This commit is contained in:
fmtabbara
2023-09-22 12:06:12 +01:00
parent f35396481f
commit c0b8ddd48e
2 changed files with 14 additions and 2 deletions
+1 -1
View File
@@ -31,7 +31,7 @@
"@nymproject/mui-theme": "^1.0.0",
"@nymproject/react": "^1.0.0",
"@nymproject/types": "^1.0.0",
"@nymproject/node-tester": ">=1.2.0-rc.5 || ^1",
"@nymproject/node-tester": ">=1.2.0-rc.8",
"@storybook/react": "^6.5.15",
"@tauri-apps/api": "^1.2.0",
"@tauri-apps/tauri-forage": "^1.0.0-beta.2",
+13 -1
View File
@@ -36,7 +36,19 @@ export const MockAccountsProvider: FCWithChildren = ({ children }) => {
password: string;
account: AccountEntry;
newAccountName: string;
}) => {};
}) => {
if (password) {
setIsLoading(true);
try {
setAccounts((accs) => accs.map((acc) => (acc.id === account.id ? { ...acc, id: newAccountName } : acc)));
setDialogToDisplay('Accounts');
} catch (e) {
setError(`Error adding account: ${e}`);
} finally {
setIsLoading(false);
}
}
};
const handleImportAccount = (account: AccountEntry) => setAccounts((accs) => [...(accs ? [...accs] : []), account]);