"use strict";

Object.defineProperty(exports, "__esModule", {
  value: true
});
exports["default"] = void 0;
var axios = require('axios');
// import CONFIG from './constants/index';
var getHeader = function getHeader() {
  var jwt = localStorage.getItem('jwt');
  var header = {
    'Content-type': 'application/json'
  };
  if (jwt) header.Authorization = "Bearer ".concat(jwt);
  return header;
};
var http = function http() {
  var _axios = axios.create({
    baseURL: "".concat(process.env.REACT_APP_BACKEND_URL, "/api"),
    //CONFIG.STRAPI_URL,

    headers: getHeader()
  });
  return _axios;
};
var _default = http;
exports["default"] = _default;