15088: Adds progress circle when loading the link panel
[arvados-workbench2.git] / src / store / link-account-panel / link-account-panel-reducer.ts
index 3d20584219b90fdd2b48d10182aa01586242e19c..21c2c9ebbc12fda9d92e5621ba6138b5c7243efe 100644 (file)
@@ -35,6 +35,7 @@ export interface LinkAccountPanelState {
     userToLinkToken: string | undefined;
     status: LinkAccountPanelStatus;
     error: LinkAccountPanelError;
+    isProcessing: boolean;
 }
 
 const initialState = {
@@ -44,6 +45,7 @@ const initialState = {
     targetUserToken: undefined,
     userToLink: undefined,
     userToLinkToken: undefined,
+    isProcessing: false,
     status: LinkAccountPanelStatus.NONE,
     error: LinkAccountPanelError.NONE
 };
@@ -74,6 +76,10 @@ export const linkAccountPanelReducer = (state: LinkAccountPanelState = initialSt
         SET_SELECTED_CLUSTER: ({ selectedCluster }) => ({
             ...state, selectedCluster
         }),
+        SET_IS_PROCESSING: ({ isProcessing }) =>({
+            ...state,
+            isProcessing
+        }),
         HAS_SESSION_DATA: () => ({
             ...state, status: LinkAccountPanelStatus.HAS_SESSION_DATA
         })