1 // Copyright (C) The Arvados Authors. All rights reserved.
3 // SPDX-License-Identifier: AGPL-3.0
5 import { PropertiesState, setProperty, deleteProperty } from './properties';
6 import { PropertiesAction, propertiesActions } from './properties-actions';
9 export const propertiesReducer = (state: PropertiesState = {}, action: PropertiesAction) =>
10 propertiesActions.match(action, {
11 SET_PROPERTY: ({ key, value }) => setProperty(key, value)(state),
12 DELETE_PROPERTY: key => deleteProperty(key)(state),