Browse Source

feat(client): resolve type errors in impersonation storage service

pull/7175/head
KenTandrian 2 weeks ago
parent
commit
d0b11bd90f
  1. 2
      apps/client/src/app/components/header/header.component.ts
  2. 4
      apps/client/src/app/services/impersonation-storage.service.ts

2
apps/client/src/app/components/header/header.component.ts

@ -101,7 +101,7 @@ export class GfHeaderComponent implements OnChanges {
protected hasPermissionToAccessAssistant: boolean; protected hasPermissionToAccessAssistant: boolean;
protected hasPermissionToAccessFearAndGreedIndex: boolean; protected hasPermissionToAccessFearAndGreedIndex: boolean;
protected hasPermissionToCreateUser: boolean; protected hasPermissionToCreateUser: boolean;
protected impersonationId: string; protected impersonationId: string | null;
protected readonly internalRoutes = internalRoutes; protected readonly internalRoutes = internalRoutes;
protected isMenuOpen: boolean; protected isMenuOpen: boolean;
protected readonly routeAbout = publicRoutes.about.path; protected readonly routeAbout = publicRoutes.about.path;

4
apps/client/src/app/services/impersonation-storage.service.ts

@ -7,11 +7,11 @@ export const IMPERSONATION_KEY = 'impersonationId';
providedIn: 'root' providedIn: 'root'
}) })
export class ImpersonationStorageService { export class ImpersonationStorageService {
private hasImpersonationChangeSubject = new BehaviorSubject<string>( private hasImpersonationChangeSubject = new BehaviorSubject<string | null>(
this.getId() this.getId()
); );
public getId(): string { public getId(): string | null {
return window.localStorage.getItem(IMPERSONATION_KEY); return window.localStorage.getItem(IMPERSONATION_KEY);
} }

Loading…
Cancel
Save