mirror of
https://github.com/uetchy/namae.git
synced 2025-03-19 13:30:32 +09:00
35 lines
859 B
TypeScript
35 lines
859 B
TypeScript
import React from 'react';
|
|
import ReactDOM from 'react-dom';
|
|
import {Router} from 'react-router-dom';
|
|
|
|
import App from './App';
|
|
import * as serviceWorker from './serviceWorker';
|
|
import {FullScreenSuspense} from './util/suspense';
|
|
import {initHistoryWithGA, initSentry} from './util/analytics';
|
|
import {initCrisp} from './util/crip';
|
|
import './util/i18n';
|
|
|
|
initSentry();
|
|
initCrisp();
|
|
|
|
const history = initHistoryWithGA();
|
|
|
|
ReactDOM.render(
|
|
<FullScreenSuspense>
|
|
<Router history={history}>
|
|
<App />
|
|
</Router>
|
|
</FullScreenSuspense>,
|
|
document.getElementById('root'),
|
|
);
|
|
|
|
serviceWorker.register({
|
|
onUpdate: (registration) => {
|
|
console.log('New version available! Ready to update?');
|
|
if (registration && registration.waiting) {
|
|
registration.waiting.postMessage({type: 'SKIP_WAITING'});
|
|
}
|
|
window.location.reload();
|
|
},
|
|
});
|