Login Logout Navbar ProfileForm moved to MUI

This commit is contained in:
QkoSad
2023-08-14 19:10:42 +03:00
parent e86db26687
commit 7cd63ec826
50 changed files with 3356 additions and 5054 deletions
+7 -7
View File
@@ -1,20 +1,20 @@
import axios from 'axios';
import store from '../store';
import axios from "axios";
import store from "../store";
const api = axios.create({
baseURL: '/api',
baseURL: "/api",
headers: {
'Content-Type': 'application/json'
}
"Content-Type": "application/json",
},
});
api.interceptors.response.use(
(res) => res,
(err) => {
if (err.response.status === 401) {
store.dispatch({ type: 'auth/logOut' });
store.dispatch({ type: "auth/logOut" });
}
return Promise.reject(err);
}
},
);
export default api;