X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/378c6a3a18cd9849bf4233e130a9ffdf250de35e..4b961d16b8f8ef8afbd13697a79fe4684acd0416:/src/store/collection-panel/collection-panel-reducer.ts?ds=sidebyside diff --git a/src/store/collection-panel/collection-panel-reducer.ts b/src/store/collection-panel/collection-panel-reducer.ts index 0dd233ea..f09b0198 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, - LOAD_COLLECTION_SUCCESS: ({ item }) => ({ ...state, item }), + SET_COLLECTION: (item) => ({ ...state, item }), + LOAD_COLLECTION_SUCCESS: ({ item }) => ({ ...state, item }) });