Skip to content

Commit

Permalink
Fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Janelle Law committed Oct 15, 2021
1 parent 6437f08 commit 727b3fc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 11 deletions.
2 changes: 1 addition & 1 deletion src/app/Shared/Services/NotificationChannel.service.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand Down
13 changes: 3 additions & 10 deletions src/app/routes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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]);

Expand Down

0 comments on commit 727b3fc

Please sign in to comment.