Added removing files during upload feature
[arvados-workbench2.git] / src / store / config / config-reducer.ts
1 // Copyright (C) The Arvados Authors. All rights reserved.
2 //
3 // SPDX-License-Identifier: AGPL-3.0
4
5 import { configActions, ConfigAction } from "./config-action";
6 import { mockConfig } from '~/common/config';
7
8 export const configReducer = (state = mockConfig({}), action: ConfigAction) => {
9     return configActions.match(action, {
10         CONFIG: ({ config }) => {
11             return {
12                 ...state, ...config
13             };
14         },
15         default: () => state
16     });
17 };