text: import axios from 'axios';
  
  const API = axios.create({
      baseURL: process.env.REACT_APP_API_URL,
      headers: {
          'Content-Type': 'application/json',
      },
  });
  
  API.interceptors.request.use(
      config => {
          const token = localStorage.getItem('token');
          if (token) {
              config.headers.Authorization = `Bearer ${token}`;
              return config;
          }
  
          return config;
      },
      err => Promise.reject(err),
  );
  
  export default API;
  