X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/7ae86efd9905582df4191910528c3803a68ba81b..153542362119d734c6d9a03d265ac077d1ed33dd:/src/store/collection-panel/collection-panel-reducer.ts diff --git a/src/store/collection-panel/collection-panel-reducer.ts b/src/store/collection-panel/collection-panel-reducer.ts index 0dd233eaf0..6afba66c4c 100644 --- a/src/store/collection-panel/collection-panel-reducer.ts +++ b/src/store/collection-panel/collection-panel-reducer.ts @@ -3,19 +3,21 @@ // SPDX-License-Identifier: AGPL-3.0 import { collectionPanelActions, CollectionPanelAction } from "./collection-panel-action"; -import { CollectionResource } from "../../models/collection"; +import { CollectionResource } from "models/collection"; export interface CollectionPanelState { item: CollectionResource | null; } const initialState = { - item: null + item: null, }; export const collectionPanelReducer = (state: CollectionPanelState = initialState, action: CollectionPanelAction) => collectionPanelActions.match(action, { default: () => state, - LOAD_COLLECTION: () => state, - LOAD_COLLECTION_SUCCESS: ({ item }) => ({ ...state, item }), + SET_COLLECTION: (item) => ({ + ...state, + item, + }), });