//import 'bootstrap/dist/css/bootstrap.css';
import 'react-toastify/dist/ReactToastify.css';
import * as React from 'react';
import * as ReactDOM from 'react-dom';
import { BrowserRouter } from 'react-router-dom';
import { Router } from "react-router";
import App from './App';
import registerServiceWorker from './registerServiceWorker';
import history from "./history";
import { SetHttpAuthorizationToken } from './services/localStorageService';

//const baseUrl = document.getElementsByTagName('base')[0].getAttribute('href');
const rootElement = document.getElementById('root');
SetHttpAuthorizationToken();

ReactDOM.render(
	/* Nejak nefunguje musel jsem pridat BrowserRouter i do App.tsx */
	/*<BrowserRouter basename={baseUrl}>*/
	<BrowserRouter>
		<Router history={history}>
			<App />
		</Router>
  </BrowserRouter>,
  rootElement);

registerServiceWorker();
