text: import React from 'react';
  import ReactDOM from 'react-dom';
  import './index.css';
  import App from './App';
  import * as serviceWorker from './serviceWorker';
  import axios from 'axios';
  import { createBrowserHistory } from 'history';
  import {API_URL_PROD} from './credentials.js'
  
  const history = createBrowserHistory();
  
  const path = (/#!(\/.*)$/.exec(window.location.hash) || [])[1];
  if (path) {
      history.replace(path);
  }
  
  function getCookie(name) {
    var value = "; " + document.cookie;
    var parts = value.split("; " + name + "=");
    if (parts.length === 2) return parts.pop().split(";").shift();
    else return 'NO AUTH';
  }
  
  if(process.env.NODE_ENV === 'production') {
    axios.defaults.baseURL = API_URL_PROD;
  }
  axios.defaults.headers.common['Authorization'] = getCookie('isah_id');
  
  
  ReactDOM.render(
    <React.StrictMode>
      <App />
    </React.StrictMode>,
    document.getElementById('root')
  );
  
  // If you want your app to work offline and load faster, you can change
  // unregister() to register() below. Note this comes with some pitfalls.
  // Learn more about service workers: https://bit.ly/CRA-PWA
  serviceWorker.unregister();
  