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

16 lines
427 B
TypeScript
Raw Normal View History

2019-06-13 18:57:49 -06:00
import { detectLanguage } from "../i18n";
import { attachToRoot } from "../util";
2019-06-13 18:57:49 -06:00
import { stopIE } from "../util/stop_ie";
2019-10-30 14:14:31 -06:00
import I, { InitOptions } from "i18next";
2019-06-21 07:09:14 -06:00
import { DemoIframe } from "./demo_iframe";
2019-06-16 12:10:25 -06:00
2019-06-21 07:09:14 -06:00
// ENTRY POINT FOR WEB APP DEMO IFRAME ===========
2019-06-16 12:10:25 -06:00
2019-06-13 18:57:49 -06:00
stopIE();
2019-06-21 07:09:14 -06:00
const doAttach = () => attachToRoot(DemoIframe);
const loadDemo =
2019-10-30 14:14:31 -06:00
(config: InitOptions) => I.init(config, doAttach);
2019-06-13 18:57:49 -06:00
2019-06-21 07:09:14 -06:00
detectLanguage().then(loadDemo);