X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/ada23a4054724d0d6be4ee88efb22daecd86001f..499c2c0ca2c1a7a88aeb9ec9a622f9c7f5399343:/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 4207a39304..6afba66c4c 100644 --- a/src/store/collection-panel/collection-panel-reducer.ts +++ b/src/store/collection-panel/collection-panel-reducer.ts @@ -3,22 +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; - numberOfCollectionsWithSamePDH: number; } const initialState = { item: null, - numberOfCollectionsWithSamePDH: 0 }; export const collectionPanelReducer = (state: CollectionPanelState = initialState, action: CollectionPanelAction) => collectionPanelActions.match(action, { default: () => state, - SET_COLLECTION: (item) => ({ ...state, item }), - LOAD_COLLECTION_SUCCESS: ({ item }) => ({ ...state, item }), - SET_NUMBER_OF_COLLECTIONS_WITH_SAME_PDH: (num) => ({ ...state, numberOfCollectionsWithSamePDH: num }), + SET_COLLECTION: (item) => ({ + ...state, + item, + }), });