Browse Source

Task/eliminate OnDestroy lifecycle hook from landing page component (#6595)

* Eliminate OnDestroy lifecycle hook
pull/6596/head
Ayush Mishra 4 days ago
committed by GitHub
parent
commit
68473cfaa9
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 12
      apps/client/src/app/pages/landing/landing-page.component.ts

12
apps/client/src/app/pages/landing/landing-page.component.ts

@ -9,7 +9,7 @@ import { GfValueComponent } from '@ghostfolio/ui/value';
import { GfWorldMapChartComponent } from '@ghostfolio/ui/world-map-chart';
import { CommonModule } from '@angular/common';
import { Component, OnDestroy, OnInit } from '@angular/core';
import { Component, OnInit } from '@angular/core';
import { MatButtonModule } from '@angular/material/button';
import { MatCardModule } from '@angular/material/card';
import { RouterModule } from '@angular/router';
@ -21,7 +21,6 @@ import {
starOutline
} from 'ionicons/icons';
import { DeviceDetectorService } from 'ngx-device-detector';
import { Subject } from 'rxjs';
@Component({
host: { class: 'page' },
@ -40,7 +39,7 @@ import { Subject } from 'rxjs';
styleUrls: ['./landing-page.scss'],
templateUrl: './landing-page.html'
})
export class GfLandingPageComponent implements OnDestroy, OnInit {
export class GfLandingPageComponent implements OnInit {
public countriesOfSubscribersMap: {
[code: string]: { value: number };
} = {};
@ -107,8 +106,6 @@ export class GfLandingPageComponent implements OnDestroy, OnInit {
}
];
private unsubscribeSubject = new Subject<void>();
public constructor(
private dataService: DataService,
private deviceService: DeviceDetectorService
@ -155,9 +152,4 @@ export class GfLandingPageComponent implements OnDestroy, OnInit {
public ngOnInit() {
this.deviceType = this.deviceService.getDeviceInfo().deviceType;
}
public ngOnDestroy() {
this.unsubscribeSubject.next();
this.unsubscribeSubject.complete();
}
}

Loading…
Cancel
Save