feat: Fix axios interceptors.

This commit is contained in:
Ahmed Bouhuolia
2020-05-26 17:51:00 +02:00
parent dd49774f93
commit 72ba394c53
15 changed files with 369 additions and 223 deletions

View File

@@ -0,0 +1,17 @@
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,
};
},
});