2021-03-06 10:40:31 +00:00
|
|
|
/**
|
|
|
|
* Copyright (c) 2021 lingdocs.com
|
|
|
|
*
|
|
|
|
* This source code is licensed under the MIT license found in the
|
|
|
|
* LICENSE file in the root directory of this source tree.
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
import React from 'react';
|
|
|
|
import ReactDOM from 'react-dom';
|
|
|
|
import App from './App';
|
|
|
|
import { BrowserRouter as Router } from "react-router-dom";
|
2021-09-18 04:43:00 +00:00
|
|
|
import { UserProvider} from "./user-context";
|
2021-03-06 10:40:31 +00:00
|
|
|
import * as serviceWorker from './serviceWorker';
|
|
|
|
import "bootstrap/dist/css/bootstrap.min.css";
|
|
|
|
import "@fortawesome/fontawesome-free/css/all.css";
|
|
|
|
|
|
|
|
ReactDOM.render(
|
|
|
|
<React.StrictMode>
|
|
|
|
<Router>
|
2021-09-18 04:43:00 +00:00
|
|
|
<UserProvider>
|
|
|
|
<App />
|
|
|
|
</UserProvider>
|
2021-03-06 10:40:31 +00:00
|
|
|
</Router>
|
|
|
|
</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
|
2021-06-25 07:51:16 +00:00
|
|
|
serviceWorker.register();
|
2021-03-06 10:40:31 +00:00
|
|
|
// serviceWorker.register({
|
|
|
|
// onUpdate: registration => {
|
|
|
|
// const ready = window.confirm("New version available! Update?");
|
|
|
|
// if (registration && registration.waiting) {
|
|
|
|
// registration.waiting.postMessage({ type: 'SKIP_WAITING' });
|
|
|
|
// }
|
|
|
|
// if (ready) {
|
|
|
|
// window.location.reload();
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// });
|
|
|
|
|