Я не понимаю, в чем проблема, потому что моя функция конфигурации не запускается
import { axiosAuth } from './actions/axios-instances';
export function axiosAuthMiddleware({ dispatch, getState }) {
return next => action *`enter code here`*=**> {
axiosAuth.interceptors.request.use (
alert(1), //this alert(1) is calling in browser but
(config) => {
alert(1) //this alert(1) is not calling so auth token is not used in request
config.headers.Authorization = `Bearer ${"----------TOKEN HERE------------"}`;
return config;
},
function(error) {
alert(1)
return Promise.reject(error);
}
);
next(action);
};
}