X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/c0afd448c39a41d229612afe47643aed7a2cf5dd..131e30396e465c422f442becd2aa33cb15512238:/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 0dd233ea..55829cb5 100644 --- a/src/store/collection-panel/collection-panel-reducer.ts +++ b/src/store/collection-panel/collection-panel-reducer.ts @@ -3,7 +3,7 @@ // 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; @@ -16,6 +16,6 @@ const initialState = { export const collectionPanelReducer = (state: CollectionPanelState = initialState, action: CollectionPanelAction) => collectionPanelActions.match(action, { default: () => state, - LOAD_COLLECTION: () => state, + SET_COLLECTION: (item) => ({ ...state, item }), LOAD_COLLECTION_SUCCESS: ({ item }) => ({ ...state, item }), });