16115: Adds expiration date param to sharing url service method.
[arvados-workbench2.git] / src / store / dialog / dialog-reducer.ts
index 775a4d5fce87eed6f93f30650bd3ad5148567ce2..30368685064dfe6f9837d7c20d0cc4808b0cbf01 100644 (file)
@@ -11,9 +11,7 @@ export interface Dialog<T> {
     data: T;
 }
 
-const initialState: DialogState = {};
-
-export const dialogReducer = (state: DialogState = initialState, action: DialogAction) =>
+export const dialogReducer = (state: DialogState = {}, action: DialogAction) =>
 
     dialogActions.match(action, {
         OPEN_DIALOG: ({ id, data }) => ({ ...state, [id]: { open: true, data } }),
@@ -21,7 +19,7 @@ export const dialogReducer = (state: DialogState = initialState, action: DialogA
             ...state,
             [id]: state[id] ? { ...state[id], open: false } : { open: false, data: {} }
         }),
-        CLOSE_ALL_DIALOGS: () => ({ ...initialState }),
+        CLOSE_ALL_DIALOGS: () => ({ }),
         default: () => state,
     });