All files / src index.js

0% Statements 0/17
100% Branches 0/0
0% Functions 0/1
0% Lines 0/17
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61                                                                                                                         
import React, { Component } from 'react';
import ReactDOM from 'react-dom';
import { PersistGate } from 'redux-persist/integration/react';
import { Provider } from 'react-redux';
import createHistory from 'history/createBrowserHistory';
// import { Router } from 'react-router-dom';
// import { BrowserRouter as Router } from 'react-router-dom';
import './i18n';
// import './index.less';
import faIcons from './fontawesome';
import { library } from '@fortawesome/fontawesome-svg-core';
 
import App from './App';
import * as serviceWorker from './serviceWorker';
import configureStore from './redux/configureStore';
 
library.add(faIcons);
 
const history = createHistory();
 
const initialState = {};
const { store, persistor } = configureStore(initialState, history);
 
// export default class ProApp extends Component {
//     constructor(props) {
//         super(props);
//     }
//     render() {
//         // console.log ("Props sent by parent app in index file" + JSON.stringify(this.props.SelectedPractice))
//         return (
//             <Provider store={store}>
//                 <PersistGate loading={null} persistor={persistor}>
//                     <Router history={history}>
//                         <App />
//                     </Router>
//                 </PersistGate>
//             </Provider>
//         );
//     }
// }
 
export const ProApp = (props) => (
    <Provider store={store}>
        <PersistGate loading={null} persistor={persistor}>
            {/* <Router history={history}> */}
                <App props={props} />
            {/* </Router> */}
        </PersistGate>
    </Provider>
);
 
ReactDOM.render(
    <ProApp />,
    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: http://bit.ly/CRA-PWA
serviceWorker.unregister();