cleanup Lens repo with tighter linting

Signed-off-by: Sebastian Malton <smalton@mirantis.com>
This commit is contained in:
Sebastian Malton committed 2020-07-09 17:00:23 -04:00
1 parent e468105143
commit b1ff34879a
470 files changed
+8447 -7443

No files matched your search

@@ -1,6 +1,6 @@
import "./app-init.scss"
import "./app-init.scss";
import React from "react"
import React from "react";
import { render } from "react-dom";
import { t } from "@lingui/macro";
import { CubeSpinner } from "../spinner";
@@ -12,13 +12,12 @@ interface Props {
}
export class AppInit extends React.Component<Props> {
static async start(rootElem: HTMLElement) {
static async start(rootElem: HTMLElement): Promise<void> {
render(<AppInit/>, rootElem); // show loading indicator asap
await AppInit.readyStateCheck(rootElem); // wait while all good to run
}
protected static async readyStateCheck(rootElem: HTMLElement) {
protected static async readyStateCheck(rootElem: HTMLElement): Promise<void> {
const waitingList = await apiBase.get<string[]>("/ready");
if (waitingList.length > 0) {
// update waiting state
@@ -32,7 +31,7 @@ export class AppInit extends React.Component<Props> {
}
}
render() {
render(): JSX.Element {
const { serviceWaitingList = [] } = this.props;
const serviceNames = serviceWaitingList.join(", ");
return (
@@ -47,6 +46,6 @@ export class AppInit extends React.Component<Props> {
<CubeSpinner/>
</div>
</div>
)
);
}
}