Avoids 404 responses when no container request is selected.
[arvados-workbench2.git] / src / store / owner-name-uuid-enhancer / owner-name-uuid-enhancer-reducer.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { ownerNameUuidEnhancerActions, OwnerNameUuidEnhancerAction, OwnerNameState } from './owner-name-uuid-enhancer-actions';
6
7 export const ownerNameUuidEnhancerReducer = (state = {}, action: OwnerNameUuidEnhancerAction) =>
8     ownerNameUuidEnhancerActions.match(action, {
9         SET_OWNER_NAME_BY_UUID: (data: OwnerNameState) => ({...state, [data.uuid]: data.name }),
10         default: () => state,
11     });