X-Git-Url: https://git.arvados.org/arvados-workbench2.git/blobdiff_plain/10ce16c28de952f6533ca3cc9df909269e3d2a53..341b552800f6866fc3f73b4f6c1468425e485694:/src/store/details-panel/details-panel-reducer.ts diff --git a/src/store/details-panel/details-panel-reducer.ts b/src/store/details-panel/details-panel-reducer.ts index 97de4a9a..091b2fa2 100644 --- a/src/store/details-panel/details-panel-reducer.ts +++ b/src/store/details-panel/details-panel-reducer.ts @@ -3,22 +3,20 @@ // SPDX-License-Identifier: AGPL-3.0 import { detailsPanelActions, DetailsPanelAction } from "./details-panel-action"; -import { Resource } from "../../models/resource"; export interface DetailsPanelState { - item: Resource | null; + resourceUuid: string; isOpened: boolean; } const initialState = { - item: null, + resourceUuid: '', isOpened: false }; export const detailsPanelReducer = (state: DetailsPanelState = initialState, action: DetailsPanelAction) => detailsPanelActions.match(action, { default: () => state, - LOAD_DETAILS: () => state, - LOAD_DETAILS_SUCCESS: ({ item }) => ({ ...state, item }), + LOAD_DETAILS_PANEL: resourceUuid => ({ ...state, resourceUuid }), TOGGLE_DETAILS_PANEL: () => ({ ...state, isOpened: !state.isOpened }) });