projects
/
arvados-workbench2.git
/ blobdiff
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Adjust for new code structure
[arvados-workbench2.git]
/
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 adc31e4bd6f60f55eff6e6f45ea6cae0ac6b275f..091b2fa2cf1adcfa55f19454fdae2f37d9fef7d9 100644
(file)
--- 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";
// SPDX-License-Identifier: AGPL-3.0
import { detailsPanelActions, DetailsPanelAction } from "./details-panel-action";
-import { Resource } from "~/models/resource";
export interface DetailsPanelState {
export interface DetailsPanelState {
-
item: Resource | null
;
+
resourceUuid: string
;
isOpened: boolean;
}
const initialState = {
isOpened: boolean;
}
const initialState = {
-
item: null
,
+
resourceUuid: ''
,
isOpened: false
};
export const detailsPanelReducer = (state: DetailsPanelState = initialState, action: DetailsPanelAction) =>
detailsPanelActions.match(action, {
default: () => state,
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 })
});
TOGGLE_DETAILS_PANEL: () => ({ ...state, isOpened: !state.isOpened })
});