colouring-montreal/app/src/client.tsx

28 lines
612 B
TypeScript
Raw Normal View History

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