lemmy-ui/src/client/index.tsx

17 lines
483 B
TypeScript
Raw Normal View History

2021-02-22 02:39:04 +00:00
import { hydrate } from "inferno-hydrate";
import { BrowserRouter } from "inferno-router";
import { GetSiteResponse } from "lemmy-js-client";
import { App } from "../shared/components/app/app";
import { convertWindowJson, initializeSite } from "../shared/utils";
2020-08-23 04:04:58 +00:00
const site = convertWindowJson(GetSiteResponse, window.isoData.site_res);
2020-10-26 07:09:44 +00:00
initializeSite(site);
2020-08-23 04:04:58 +00:00
const wrapper = (
<BrowserRouter>
<App />
2020-08-23 04:04:58 +00:00
</BrowserRouter>
);
2021-02-22 02:39:04 +00:00
hydrate(wrapper, document.getElementById("root"));