diff --git a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html index 0a10fb1fb..9fe4706d7 100644 --- a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html +++ b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.html @@ -42,7 +42,7 @@ [value]=" isLoading() ? undefined - : performance?.netPerformanceWithCurrencyEffect + : performance().netPerformanceWithCurrencyEffect " /> @@ -54,7 +54,7 @@ [value]=" isLoading() ? undefined - : performance?.netPerformancePercentageWithCurrencyEffect + : performance().netPerformancePercentageWithCurrencyEffect " /> diff --git a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts index 4189cb336..235f0959e 100644 --- a/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts +++ b/apps/client/src/app/components/portfolio-performance/portfolio-performance.component.ts @@ -35,7 +35,6 @@ import { NgxSkeletonLoaderModule } from 'ngx-skeleton-loader'; templateUrl: './portfolio-performance.component.html' }) export class GfPortfolioPerformanceComponent implements OnChanges { - @Input() performance: PortfolioPerformance; @Input() precision: number; @Input() showDetails: boolean; @Input() unit: string; @@ -43,6 +42,7 @@ export class GfPortfolioPerformanceComponent implements OnChanges { public readonly errors = input(); public readonly isLoading = input(); public readonly locale = input(getLocale()); + public readonly performance = input.required(); private readonly value = viewChild.required>('value'); @@ -61,8 +61,8 @@ export class GfPortfolioPerformanceComponent implements OnChanges { this.value().nativeElement.innerHTML = ''; } } else { - if (isNumber(this.performance?.currentValueInBaseCurrency)) { - new CountUp('value', this.performance?.currentValueInBaseCurrency, { + if (isNumber(this.performance().currentValueInBaseCurrency)) { + new CountUp('value', this.performance().currentValueInBaseCurrency, { decimal: getNumberFormatDecimal(this.locale()), decimalPlaces: this.precision, duration: 1, @@ -71,7 +71,7 @@ export class GfPortfolioPerformanceComponent implements OnChanges { } else if (this.showDetails === false) { new CountUp( 'value', - this.performance?.netPerformancePercentageWithCurrencyEffect * 100, + this.performance().netPerformancePercentageWithCurrencyEffect * 100, { decimal: getNumberFormatDecimal(this.locale()), decimalPlaces: 2,