1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { detailsPanelActions, DetailsPanelAction } from "./details-panel-action";
6 import { Resource } from "~/models/resource";
8 export interface DetailsPanelState {
13 const initialState = {
18 export const detailsPanelReducer = (state: DetailsPanelState = initialState, action: DetailsPanelAction) =>
19 detailsPanelActions.match(action, {
21 LOAD_DETAILS_SUCCESS: ({ item }) => ({ ...state, item }),
22 TOGGLE_DETAILS_PANEL: () => ({ ...state, isOpened: !state.isOpened })