2018-09-30 14:50:09 -04:00
|
|
|
/**
|
|
|
|
* Client-side entry point to shared frontend React App
|
|
|
|
*
|
|
|
|
*/
|
2018-09-09 17:22:44 -04:00
|
|
|
import React from 'react';
|
|
|
|
import { hydrate } from 'react-dom';
|
2019-11-07 02:39:26 -05:00
|
|
|
import { BrowserRouter } from 'react-router-dom';
|
2018-09-09 17:22:44 -04:00
|
|
|
|
2021-02-08 11:03:30 -05:00
|
|
|
import { App } from './frontend/app';
|
2018-09-09 17:22:44 -04:00
|
|
|
|
2019-08-09 13:49:43 -04:00
|
|
|
const data = (window as any).__PRELOADED_STATE__; // TODO: remove any
|
2018-09-09 17:22:44 -04:00
|
|
|
|
|
|
|
hydrate(
|
2019-05-27 11:39:16 -04:00
|
|
|
<BrowserRouter>
|
2019-10-29 12:56:49 -04:00
|
|
|
<App
|
|
|
|
user={data.user}
|
|
|
|
building={data.building}
|
2020-08-04 10:54:49 -04:00
|
|
|
user_verified={data.user_verified}
|
2019-10-29 12:56:49 -04:00
|
|
|
revisionId={data.latestRevisionId}
|
|
|
|
/>
|
2019-05-27 11:39:16 -04:00
|
|
|
</BrowserRouter>,
|
|
|
|
document.getElementById('root')
|
2018-09-09 17:22:44 -04:00
|
|
|
);
|
|
|
|
|
|
|
|
if (module.hot) {
|
2019-05-27 11:39:16 -04:00
|
|
|
module.hot.accept();
|
2018-09-09 17:22:44 -04:00
|
|
|
}
|