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 BrowserRouter from 'react-router-dom/BrowserRouter';
|
|
|
|
import React from 'react';
|
|
|
|
import { hydrate } from 'react-dom';
|
|
|
|
|
|
|
|
import App from './frontend/app';
|
|
|
|
|
|
|
|
const data = window.__PRELOADED_STATE__;
|
|
|
|
|
|
|
|
hydrate(
|
2019-05-27 11:39:16 -04:00
|
|
|
<BrowserRouter>
|
|
|
|
<App user={data.user} building={data.building} building_like={data.building_like} />
|
|
|
|
</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
|
|
|
}
|