mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
cleanup Lens repo with tighter linting
Signed-off-by: Sebastian Malton <smalton@mirantis.com>
This commit is contained in:
1 parent
e468105143
commit
b1ff34879a
470 files changed
+8447
-7443
No files matched your search
@@ -1,4 +1,4 @@
|
||||
import "./error-boundary.scss"
|
||||
import "./error-boundary.scss";
|
||||
|
||||
import React, { ErrorInfo } from "react";
|
||||
import { reaction } from "mobx";
|
||||
@@ -27,19 +27,19 @@ export class ErrorBoundary extends React.Component<Props, State> {
|
||||
() => this.setState({ error: null, errorInfo: null })
|
||||
)
|
||||
|
||||
componentDidCatch(error: Error, errorInfo: ErrorInfo) {
|
||||
componentDidCatch(error: Error, errorInfo: ErrorInfo): void {
|
||||
this.setState({ error, errorInfo });
|
||||
}
|
||||
|
||||
back = () => {
|
||||
back = (): void => {
|
||||
navigation.goBack();
|
||||
}
|
||||
|
||||
render() {
|
||||
render(): JSX.Element | React.ReactNode {
|
||||
const { error, errorInfo } = this.state;
|
||||
if (error) {
|
||||
const slackLink = <a href="https://join.slack.com/t/k8slens/shared_invite/enQtOTc5NjAyNjYyOTk4LWU1NDQ0ZGFkOWJkNTRhYTc2YjVmZDdkM2FkNGM5MjhiYTRhMDU2NDQ1MzIyMDA4ZGZlNmExOTc0N2JmY2M3ZGI" target="_blank">Slack</a>
|
||||
const githubLink = <a href="https://github.com/lensapp/lens/issues" target="_blank">Github</a>
|
||||
const slackLink = <a href="https://join.slack.com/t/k8slens/shared_invite/enQtOTc5NjAyNjYyOTk4LWU1NDQ0ZGFkOWJkNTRhYTc2YjVmZDdkM2FkNGM5MjhiYTRhMDU2NDQ1MzIyMDA4ZGZlNmExOTc0N2JmY2M3ZGI" rel="noreferrer" target="_blank">Slack</a>;
|
||||
const githubLink = <a href="https://github.com/lensapp/lens/issues" rel="noreferrer" target="_blank">Github</a>;
|
||||
const pageUrl = location.href;
|
||||
return (
|
||||
<div className="ErrorBoundary flex column gaps">
|
||||
@@ -68,7 +68,7 @@ export class ErrorBoundary extends React.Component<Props, State> {
|
||||
onClick={this.back}
|
||||
/>
|
||||
</div>
|
||||
)
|
||||
);
|
||||
}
|
||||
return this.props.children;
|
||||
}
|
||||
|
||||
@@ -1 +1 @@
|
||||
export * from "./error-boundary"
|
||||
export * from "./error-boundary";
|
||||
Reference in new issue
Block a user