Browse Source

feat(client): replace deprecated getDeviceInfo

pull/6807/head
KenTandrian 4 weeks ago
parent
commit
11edc3b45c
  1. 7
      apps/client/src/app/pages/portfolio/fire/fire-page.component.ts
  2. 2
      apps/client/src/app/pages/portfolio/fire/fire-page.html

7
apps/client/src/app/pages/portfolio/fire/fire-page.component.ts

@ -16,6 +16,7 @@ import { CommonModule, NgStyle } from '@angular/common';
import { import {
ChangeDetectorRef, ChangeDetectorRef,
Component, Component,
computed,
DestroyRef, DestroyRef,
inject, inject,
OnInit OnInit
@ -43,7 +44,10 @@ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader';
templateUrl: './fire-page.html' templateUrl: './fire-page.html'
}) })
export class GfFirePageComponent implements OnInit { export class GfFirePageComponent implements OnInit {
protected deviceType: string; protected readonly deviceType = computed(
() => this.deviceService.deviceInfo().deviceType
);
protected fireWealth: FireWealth; protected fireWealth: FireWealth;
protected hasImpersonationId: boolean; protected hasImpersonationId: boolean;
protected hasPermissionToUpdateUserSettings: boolean; protected hasPermissionToUpdateUserSettings: boolean;
@ -74,7 +78,6 @@ export class GfFirePageComponent implements OnInit {
public ngOnInit() { public ngOnInit() {
this.isLoading = true; this.isLoading = true;
this.deviceType = this.deviceService.getDeviceInfo().deviceType;
this.dataService this.dataService
.fetchPortfolioDetails() .fetchPortfolioDetails()

2
apps/client/src/app/pages/portfolio/fire/fire-page.html

@ -13,7 +13,7 @@
[annualInterestRate]="user?.settings?.annualInterestRate" [annualInterestRate]="user?.settings?.annualInterestRate"
[colorScheme]="user?.settings?.colorScheme" [colorScheme]="user?.settings?.colorScheme"
[currency]="user?.settings?.baseCurrency" [currency]="user?.settings?.baseCurrency"
[deviceType]="deviceType" [deviceType]="deviceType()"
[fireWealth]="fireWealth?.today.valueInBaseCurrency" [fireWealth]="fireWealth?.today.valueInBaseCurrency"
[hasPermissionToUpdateUserSettings]=" [hasPermissionToUpdateUserSettings]="
!hasImpersonationId && hasPermissionToUpdateUserSettings !hasImpersonationId && hasPermissionToUpdateUserSettings

Loading…
Cancel
Save