From f4c79c406fd4fb4543fd9f390d3976d37bc66f5b Mon Sep 17 00:00:00 2001 From: Janelle Law Date: Wed, 13 Oct 2021 16:06:39 -0400 Subject: [PATCH] Fix formatting --- .../Shared/Services/NotificationChannel.service.tsx | 2 +- src/app/routes.tsx | 13 +++---------- 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/src/app/Shared/Services/NotificationChannel.service.tsx b/src/app/Shared/Services/NotificationChannel.service.tsx index 8e5261ad0b..7b9c768d2e 100644 --- a/src/app/Shared/Services/NotificationChannel.service.tsx +++ b/src/app/Shared/Services/NotificationChannel.service.tsx @@ -39,7 +39,7 @@ import { Notifications } from '@app/Notifications/Notifications'; import { BehaviorSubject, combineLatest, Observable, Subject, timer } from 'rxjs'; import { fromFetch } from 'rxjs/fetch'; import { webSocket, WebSocketSubject } from 'rxjs/webSocket'; -import { concatMap, debounceTime, distinctUntilChanged, filter } from 'rxjs/operators'; +import { concatMap, distinctUntilChanged, filter } from 'rxjs/operators'; import { Base64 } from 'js-base64'; import * as _ from 'lodash'; import { LoginService, SessionState } from './Login.service'; diff --git a/src/app/routes.tsx b/src/app/routes.tsx index f8fcf61261..80544e8077 100644 --- a/src/app/routes.tsx +++ b/src/app/routes.tsx @@ -50,7 +50,6 @@ import { accessibleRouteChangeHandler } from '@app/utils/utils'; import { Route, RouteComponentProps, Switch } from 'react-router-dom'; import { LastLocationProvider, useLastLocation } from 'react-router-last-location'; import { About } from './About/About'; -import { combineLatest } from 'rxjs'; import { SessionState } from './Shared/Services/Login.service'; let routeFocusTimer: number; @@ -175,15 +174,9 @@ const AppRoutes = () => { const [showDashboard, setShowDashboard] = React.useState(false); React.useEffect(() => { - const sub = context.login.getSessionState().subscribe( - (sessionState) => { - if(sessionState === SessionState.USER_SESSION) { - setShowDashboard(true); - } else { - setShowDashboard(false); - } - } - ); + const sub = context.login + .getSessionState() + .subscribe(sessionState => setShowDashboard(sessionState === SessionState.USER_SESSION)); return () => sub.unsubscribe(); }, [context, context.login, setShowDashboard]);