shlink-web-client/src/index.js

34 lines
1 KiB
JavaScript
Raw Normal View History

2018-06-03 21:12:40 +03:00
import 'bootstrap/dist/css/bootstrap.min.css';
2018-05-13 09:57:47 +03:00
import React from 'react';
import { render } from 'react-dom';
2018-06-03 21:12:40 +03:00
import { Provider } from 'react-redux';
2018-06-03 14:15:52 +03:00
import { BrowserRouter } from 'react-router-dom';
2018-08-05 09:13:12 +03:00
import { applyMiddleware, compose, createStore } from 'redux';
2018-06-15 22:49:25 +03:00
import ReduxThunk from 'redux-thunk';
2018-05-13 09:57:47 +03:00
import App from './App';
2018-06-03 21:12:40 +03:00
import './index.scss';
import ScrollToTop from './common/ScrollToTop';
2018-06-03 21:12:40 +03:00
import reducers from './reducers';
2018-05-13 09:57:47 +03:00
import registerServiceWorker from './registerServiceWorker';
import '../node_modules/react-datepicker/dist/react-datepicker.css';
import './common/react-tagsinput.scss';
2018-05-13 09:57:47 +03:00
2018-08-05 09:13:12 +03:00
const composeEnhancers = process.env.NODE_ENV !== 'production' && window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
? window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__
: compose;
const store = createStore(reducers, composeEnhancers(
applyMiddleware(ReduxThunk)
));
2018-06-03 21:12:40 +03:00
render(
2018-06-03 21:12:40 +03:00
<Provider store={store}>
<BrowserRouter>
2018-08-05 12:20:09 +03:00
<ScrollToTop>
<App />
</ScrollToTop>
2018-06-03 21:12:40 +03:00
</BrowserRouter>
</Provider>,
2018-06-03 14:15:52 +03:00
document.getElementById('root')
);
2018-05-13 09:57:47 +03:00
registerServiceWorker();