mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 13:50:31 +00:00
18 lines
327 B
JavaScript
18 lines
327 B
JavaScript
import { createReducer } from '@reduxjs/toolkit';
|
|
import t from 'store/types';
|
|
|
|
const initialState = {
|
|
data: {},
|
|
};
|
|
|
|
export default createReducer(initialState, {
|
|
['GLOBAL_ERRORS_SET']: (state, action) => {
|
|
const { errors } = action.payload;
|
|
|
|
state.data = {
|
|
...state.data,
|
|
...errors,
|
|
};
|
|
},
|
|
});
|