fix(Axios & Layout): add Shop-ID header to Axios instance and navigate to home on shop ID set
This commit is contained in:
@@ -10,6 +10,11 @@ const useAxios = () => {
|
||||
const instance = axios.create({
|
||||
baseURL: "https://api.persain-game.com/api/v1",
|
||||
maxBodyLength: Infinity,
|
||||
...(sessionStorage.getItem("shop_id") && {
|
||||
headers: {
|
||||
"Shop-ID": sessionStorage.getItem("shop_id"),
|
||||
},
|
||||
}),
|
||||
});
|
||||
|
||||
instance.interceptors.request.use(
|
||||
|
||||
Reference in New Issue
Block a user