1
0
mirror of https://github.com/lensapp/lens.git synced 2025-05-20 05:10:56 +00:00
lens/src/renderer/index.tsx
Roman 6df56b5471 cluster-manager view
Signed-off-by: Roman <ixrock@gmail.com>
2020-07-10 12:47:50 +03:00

42 lines
1.1 KiB
TypeScript

import "../common/system-ca"
import React from "react";
import { render } from "react-dom";
import { Router } from "react-router";
import { userStore } from "../common/user-store";
import { workspaceStore } from "../common/workspace-store";
import { clusterStore } from "../common/cluster-store";
import { I18nProvider } from "@lingui/react";
import { browserHistory } from "./navigation";
import { _i18n } from "./i18n";
import { App } from "./components/app";
import { ClusterManager } from "./components/cluster-manager";
import { ErrorBoundary } from "./components/error-boundary";
class LensApp extends React.Component {
static async init() {
await Promise.all([
userStore.load(),
workspaceStore.load(),
clusterStore.load(),
]);
await App.init();
render(<LensApp/>, App.rootElem);
}
render() {
return (
<I18nProvider i18n={_i18n}>
<Router history={browserHistory}>
<ErrorBoundary>
<ClusterManager>
<App/>
</ClusterManager>
</ErrorBoundary>
</Router>
</I18nProvider>
)
}
}
window.addEventListener("load", LensApp.init);