From f98881583555e923915942ba4deb6e4e9261ff53 Mon Sep 17 00:00:00 2001 From: Thomas Kaul <4159106+dtslvr@users.noreply.github.com> Date: Wed, 16 Apr 2025 20:46:06 +0200 Subject: [PATCH] Refactoring --- apps/client/src/app/app.component.ts | 4 ++++ .../personal-finance-tools/product-page.component.ts | 10 ---------- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/apps/client/src/app/app.component.ts b/apps/client/src/app/app.component.ts index 38ed64cc9..38e48f139 100644 --- a/apps/client/src/app/app.component.ts +++ b/apps/client/src/app/app.component.ts @@ -142,6 +142,10 @@ export class AppComponent implements OnDestroy, OnInit { permissions.enableFearAndGreedIndex ); + this.hasPromotion = + !!this.info?.subscriptionOffer?.coupon || + !!this.info?.subscriptionOffer?.durationExtension; + this.impersonationStorageService .onChangeHasImpersonation() .pipe(takeUntil(this.unsubscribeSubject)) diff --git a/apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts b/apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts index c64218a7b..bee5cb642 100644 --- a/apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts +++ b/apps/client/src/app/pages/resources/personal-finance-tools/product-page.component.ts @@ -1,13 +1,11 @@ import { DataService } from '@ghostfolio/client/services/data.service'; import { Product } from '@ghostfolio/common/interfaces'; -import { User } from '@ghostfolio/common/interfaces'; import { personalFinanceTools } from '@ghostfolio/common/personal-finance-tools'; import { translate } from '@ghostfolio/ui/i18n'; import { Component, OnInit } from '@angular/core'; import { MatButtonModule } from '@angular/material/button'; import { ActivatedRoute, RouterModule } from '@angular/router'; -import { Subject } from 'rxjs'; @Component({ host: { class: 'page' }, @@ -28,9 +26,6 @@ export class GfProductPageComponent implements OnInit { 'personal-finance-tools' ]; public tags: string[]; - public user: User; - - private unsubscribeSubject = new Subject(); public constructor( private dataService: DataService, @@ -106,9 +101,4 @@ export class GfProductPageComponent implements OnInit { return a.localeCompare(b, undefined, { sensitivity: 'base' }); }); } - - public ngOnDestroy() { - this.unsubscribeSubject.next(); - this.unsubscribeSubject.complete(); - } }