From 939e18624af4252551f38c43335ee8ef0acd144c Mon Sep 17 00:00:00 2001 From: bobzel Date: Sun, 21 Apr 2024 19:03:49 -0400 Subject: more lint cleanup --- src/client/views/topbar/TopBar.tsx | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'src/client/views/topbar') diff --git a/src/client/views/topbar/TopBar.tsx b/src/client/views/topbar/TopBar.tsx index b87e5cdde..1ab0932a3 100644 --- a/src/client/views/topbar/TopBar.tsx +++ b/src/client/views/topbar/TopBar.tsx @@ -36,6 +36,7 @@ import { dropActionType } from '../../util/DropActionTypes'; */ @observer export class TopBar extends ObservableReactComponent<{}> { + // eslint-disable-next-line no-use-before-define static Instance: TopBar; @observable private _flipDocumentation = 0; constructor(props: any) { @@ -45,10 +46,12 @@ export class TopBar extends ObservableReactComponent<{}> { } navigateToHome = () => { - (CollectionDockingView.Instance?.CaptureThumbnail() ?? new Promise(res => res())).then(() => { + (CollectionDockingView.Instance?.CaptureThumbnail() ?? + new Promise(res => { res(); })) .then(() => + { Doc.ActivePage = 'home'; DashboardView.closeActiveDashboard(); // bcz: if we do this, we need some other way to keep track, for user convenience, of the last dashboard in use - }); + }); // prettier-ignore }; @computed get color() { @@ -62,7 +65,9 @@ export class TopBar extends ObservableReactComponent<{}> { } @observable happyHeart: boolean = PingManager.Instance.IsBeating; - setHappyHeart = action((status: boolean) => (this.happyHeart = status)); + setHappyHeart = action((status: boolean) => { + this.happyHeart = status; + }); dispose = reaction( () => PingManager.Instance.IsBeating, isBeating => this.setHappyHeart(isBeating) @@ -86,7 +91,7 @@ export class TopBar extends ObservableReactComponent<{}> { /> ) : (
- dash logo + dash logo brown dash
@@ -193,11 +198,11 @@ export class TopBar extends ObservableReactComponent<{}> { }} /> ) : null} - } /> + } /> - window.open('https://brown-dash.github.io/Dash-Documentation/', '_blank')} icon={} /> + window.open('https://brown-dash.github.io/Dash-Documentation/', '_blank')} icon={} /> - } /> + } /> { /** * Make the documentation icon flip around to draw attention to it. */ - FlipDocumentationIcon = action(() => (this._flipDocumentation = this._flipDocumentation + 1)); + FlipDocumentationIcon = action(() => { + this._flipDocumentation += 1; + }); render() { return ( - //TODO:glr Add support for light / dark mode + // TODO:glr Add support for light / dark mode