File size: 305 Bytes
75f8a84
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
import axios from "axios";

const API = axios.create({
  baseURL: "https://Daviddolor-dolor3v.hf.space",
});

API.interceptors.request.use((config) => {
  const token = localStorage.getItem("token");
  if (token) config.headers.Authorization = `Bearer ${token}`;
  return config;
});

export default API;