Farmbot-Web-App/frontend/tos_update/index.tsx

17 lines
516 B
TypeScript
Raw Normal View History

2017-06-29 12:54:02 -06:00
import { render } from "react-dom";
2019-04-02 13:59:37 -06:00
import I from "i18next";
2017-06-29 12:54:02 -06:00
import { detectLanguage } from "../i18n";
2019-02-04 09:31:52 -07:00
import * as _React from "react";
import { createElement } from "react";
2018-08-03 08:04:49 -06:00
import { TosUpdate } from "./component";
2017-06-29 12:54:02 -06:00
2018-08-03 08:04:49 -06:00
const node = document.createElement("DIV");
node.id = "root";
document.body.appendChild(node);
const domElem = document.getElementById("root");
2019-02-04 09:31:52 -07:00
const reactElem = createElement(TosUpdate, {});
2017-06-29 12:54:02 -06:00
2018-08-03 08:04:49 -06:00
const ok = () => domElem && render(reactElem, domElem);
2017-06-29 12:54:02 -06:00
2019-04-02 13:59:37 -06:00
detectLanguage().then(conf => I.init(conf, ok));