mirror of
https://github.com/aliasvault/aliasvault.git
synced 2026-03-19 07:07:59 -04:00
Show loading state when deleting a credential (#771)
This commit is contained in:
@@ -370,6 +370,8 @@ export default function AddEditCredentialScreen() : React.ReactNode {
|
||||
* Delete the credential.
|
||||
*/
|
||||
onPress: async () : Promise<void> => {
|
||||
setIsLoading(true);
|
||||
|
||||
await executeVaultMutation(async () => {
|
||||
await dbContext.sqliteClient!.deleteCredentialById(id);
|
||||
});
|
||||
@@ -383,6 +385,8 @@ export default function AddEditCredentialScreen() : React.ReactNode {
|
||||
});
|
||||
}, 200);
|
||||
|
||||
setIsLoading(false);
|
||||
|
||||
/*
|
||||
* Hard navigate back to the credentials list as the credential that was
|
||||
* shown in the previous screen is now deleted.
|
||||
|
||||
Reference in New Issue
Block a user