X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/7df4149100f41cc8d4a5438630ba95a1d72409a1..10ce16c28de952f6533ca3cc9df909269e3d2a53:/src/store/project/project-reducer.ts diff --git a/src/store/project/project-reducer.ts b/src/store/project/project-reducer.ts index 40356c0c..94a451a8 100644 --- a/src/store/project/project-reducer.ts +++ b/src/store/project/project-reducer.ts @@ -18,6 +18,7 @@ interface ProjectCreator { opened: boolean; pending: boolean; ownerUuid: string; + error?: string; } export function findTreeItem(tree: Array>, itemId: string): TreeItem | undefined { @@ -115,9 +116,8 @@ export const projectsReducer = (state: ProjectState = initialState, action: Proj return projectActions.match(action, { OPEN_PROJECT_CREATOR: ({ ownerUuid }) => updateCreator(state, { ownerUuid, opened: true, pending: false }), CLOSE_PROJECT_CREATOR: () => updateCreator(state, { opened: false }), - CREATE_PROJECT: () => updateCreator(state, { opened: false, pending: true }), - CREATE_PROJECT_SUCCESS: () => updateCreator(state, { ownerUuid: "", pending: false }), - CREATE_PROJECT_ERROR: () => updateCreator(state, { ownerUuid: "", pending: false }), + CREATE_PROJECT: () => updateCreator(state, { error: undefined }), + CREATE_PROJECT_SUCCESS: () => updateCreator(state, { opened: false, ownerUuid: "" }), REMOVE_PROJECT: () => state, PROJECTS_REQUEST: itemId => { const items = _.cloneDeep(state.items);