Browse Source

Task/remove unused OnDestroy hook in FAQ page component (#6437)

* Remove unused OnDestroy hook
pull/6464/head
Thomas Kaul 1 day ago
committed by GitHub
parent
commit
794c8f8016
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 17
      apps/client/src/app/pages/faq/faq-page.component.ts

17
apps/client/src/app/pages/faq/faq-page.component.ts

@ -3,19 +3,13 @@ import { hasPermission, permissions } from '@ghostfolio/common/permissions';
import { publicRoutes } from '@ghostfolio/common/routes/routes'; import { publicRoutes } from '@ghostfolio/common/routes/routes';
import { DataService } from '@ghostfolio/ui/services'; import { DataService } from '@ghostfolio/ui/services';
import { import { CUSTOM_ELEMENTS_SCHEMA, Component, OnInit } from '@angular/core';
CUSTOM_ELEMENTS_SCHEMA,
Component,
OnDestroy,
OnInit
} from '@angular/core';
import { MatTabsModule } from '@angular/material/tabs'; import { MatTabsModule } from '@angular/material/tabs';
import { RouterModule } from '@angular/router'; import { RouterModule } from '@angular/router';
import { IonIcon } from '@ionic/angular/standalone'; import { IonIcon } from '@ionic/angular/standalone';
import { addIcons } from 'ionicons'; import { addIcons } from 'ionicons';
import { cloudyOutline, readerOutline, serverOutline } from 'ionicons/icons'; import { cloudyOutline, readerOutline, serverOutline } from 'ionicons/icons';
import { DeviceDetectorService } from 'ngx-device-detector'; import { DeviceDetectorService } from 'ngx-device-detector';
import { Subject } from 'rxjs';
@Component({ @Component({
host: { class: 'page has-tabs' }, host: { class: 'page has-tabs' },
@ -25,13 +19,11 @@ import { Subject } from 'rxjs';
styleUrls: ['./faq-page.scss'], styleUrls: ['./faq-page.scss'],
templateUrl: './faq-page.html' templateUrl: './faq-page.html'
}) })
export class GfFaqPageComponent implements OnDestroy, OnInit { export class GfFaqPageComponent implements OnInit {
public deviceType: string; public deviceType: string;
public hasPermissionForSubscription: boolean; public hasPermissionForSubscription: boolean;
public tabs: TabConfiguration[] = []; public tabs: TabConfiguration[] = [];
private unsubscribeSubject = new Subject<void>();
public constructor( public constructor(
private dataService: DataService, private dataService: DataService,
private deviceService: DeviceDetectorService private deviceService: DeviceDetectorService
@ -68,9 +60,4 @@ export class GfFaqPageComponent implements OnDestroy, OnInit {
public ngOnInit() { public ngOnInit() {
this.deviceType = this.deviceService.getDeviceInfo().deviceType; this.deviceType = this.deviceService.getDeviceInfo().deviceType;
} }
public ngOnDestroy() {
this.unsubscribeSubject.next();
this.unsubscribeSubject.complete();
}
} }

Loading…
Cancel
Save