Browse Source

Eliminate onDestroy lifecycle hook from the landing page component

pull/6595/head
AyushMishra 2 weeks ago
parent
commit
8e4c580f53
  1. 13
      apps/client/src/app/pages/landing/landing-page.component.ts

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

@ -7,9 +7,8 @@ import { GfLogoComponent } from '@ghostfolio/ui/logo';
import { GfLogoCarouselComponent } from '@ghostfolio/ui/logo-carousel';
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 +20,6 @@ import {
starOutline
} from 'ionicons/icons';
import { DeviceDetectorService } from 'ngx-device-detector';
import { Subject } from 'rxjs';
@Component({
host: { class: 'page' },
@ -40,7 +38,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 +105,6 @@ export class GfLandingPageComponent implements OnDestroy, OnInit {
}
];
private unsubscribeSubject = new Subject<void>();
public constructor(
private dataService: DataService,
private deviceService: DeviceDetectorService
@ -155,9 +151,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