15088: Fixes auth-action test and simplifies link account cancel snackbar
[arvados-workbench2.git] / src / store / link-account-panel / link-account-panel-actions.ts
index 57f0681acd0c762a74ce30ccceb9ab71a19ef08f..cdc99660b7a3be268c66ee79351fa99ed75208e3 100644 (file)
@@ -223,16 +223,15 @@ export const cancelLinking = (reload: boolean = false) =>
                 setAuthorizationHeader(services, linkAccountData.token);
                 user = await services.userService.get(linkAccountData.userUuid);
                 dispatch(switchUser(user, linkAccountData.token));
+                services.linkAccountService.saveLinkOpStatus(LinkAccountStatus.CANCELLED);
             }
         }
         finally {
             if (reload) {
-                services.linkAccountService.saveLinkOpStatus(LinkAccountStatus.CANCELLED);
                 location.reload();
             }
             else {
                 dispatch(progressIndicatorActions.STOP_WORKING(WORKBENCH_LOADING_SCREEN));
-                dispatch(snackbarActions.OPEN_SNACKBAR({ message: "Account link cancelled!", kind: SnackbarKind.INFO, hideDuration: 3000 }));
             }
         }
     };