Feature/Clean up unused OnInit implementations (#3961)
* Clean up unused OnInit implementations
This commit is contained in:
parent
308d3b64b1
commit
524adfc672
@ -10,7 +10,6 @@ import {
|
|||||||
EventEmitter,
|
EventEmitter,
|
||||||
Input,
|
Input,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
OnInit,
|
|
||||||
Output
|
Output
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { MatTableDataSource } from '@angular/material/table';
|
import { MatTableDataSource } from '@angular/material/table';
|
||||||
@ -21,7 +20,7 @@ import { MatTableDataSource } from '@angular/material/table';
|
|||||||
templateUrl: './access-table.component.html',
|
templateUrl: './access-table.component.html',
|
||||||
styleUrls: ['./access-table.component.scss']
|
styleUrls: ['./access-table.component.scss']
|
||||||
})
|
})
|
||||||
export class AccessTableComponent implements OnChanges, OnInit {
|
export class AccessTableComponent implements OnChanges {
|
||||||
@Input() accesses: Access[];
|
@Input() accesses: Access[];
|
||||||
@Input() showActions: boolean;
|
@Input() showActions: boolean;
|
||||||
@Input() user: User;
|
@Input() user: User;
|
||||||
@ -37,8 +36,6 @@ export class AccessTableComponent implements OnChanges, OnInit {
|
|||||||
private notificationService: NotificationService
|
private notificationService: NotificationService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public ngOnInit() {}
|
|
||||||
|
|
||||||
public ngOnChanges() {
|
public ngOnChanges() {
|
||||||
this.displayedColumns = ['alias', 'grantee', 'type', 'details'];
|
this.displayedColumns = ['alias', 'grantee', 'type', 'details'];
|
||||||
|
|
||||||
|
@ -9,7 +9,6 @@ import {
|
|||||||
Input,
|
Input,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
OnDestroy,
|
OnDestroy,
|
||||||
OnInit,
|
|
||||||
Output,
|
Output,
|
||||||
ViewChild
|
ViewChild
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
@ -26,7 +25,7 @@ import { Subject, Subscription } from 'rxjs';
|
|||||||
templateUrl: './accounts-table.component.html',
|
templateUrl: './accounts-table.component.html',
|
||||||
styleUrls: ['./accounts-table.component.scss']
|
styleUrls: ['./accounts-table.component.scss']
|
||||||
})
|
})
|
||||||
export class AccountsTableComponent implements OnChanges, OnDestroy, OnInit {
|
export class AccountsTableComponent implements OnChanges, OnDestroy {
|
||||||
@Input() accounts: AccountModel[];
|
@Input() accounts: AccountModel[];
|
||||||
@Input() baseCurrency: string;
|
@Input() baseCurrency: string;
|
||||||
@Input() deviceType: string;
|
@Input() deviceType: string;
|
||||||
@ -61,8 +60,6 @@ export class AccountsTableComponent implements OnChanges, OnDestroy, OnInit {
|
|||||||
private router: Router
|
private router: Router
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public ngOnInit() {}
|
|
||||||
|
|
||||||
public ngOnChanges() {
|
public ngOnChanges() {
|
||||||
this.displayedColumns = ['status', 'account', 'platform'];
|
this.displayedColumns = ['status', 'account', 'platform'];
|
||||||
|
|
||||||
|
@ -12,7 +12,6 @@ import {
|
|||||||
EventEmitter,
|
EventEmitter,
|
||||||
Input,
|
Input,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
OnInit,
|
|
||||||
Output
|
Output
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { MatDialog } from '@angular/material/dialog';
|
import { MatDialog } from '@angular/material/dialog';
|
||||||
@ -42,7 +41,7 @@ import { MarketDataDetailDialog } from './market-data-detail-dialog/market-data-
|
|||||||
styleUrls: ['./admin-market-data-detail.component.scss'],
|
styleUrls: ['./admin-market-data-detail.component.scss'],
|
||||||
templateUrl: './admin-market-data-detail.component.html'
|
templateUrl: './admin-market-data-detail.component.html'
|
||||||
})
|
})
|
||||||
export class AdminMarketDataDetailComponent implements OnChanges, OnInit {
|
export class AdminMarketDataDetailComponent implements OnChanges {
|
||||||
@Input() currency: string;
|
@Input() currency: string;
|
||||||
@Input() dataSource: DataSource;
|
@Input() dataSource: DataSource;
|
||||||
@Input() dateOfFirstActivity: string;
|
@Input() dateOfFirstActivity: string;
|
||||||
@ -81,8 +80,6 @@ export class AdminMarketDataDetailComponent implements OnChanges, OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public ngOnInit() {}
|
|
||||||
|
|
||||||
public ngOnChanges() {
|
public ngOnChanges() {
|
||||||
this.defaultDateFormat = getDateFormatString(this.locale);
|
this.defaultDateFormat = getDateFormatString(this.locale);
|
||||||
|
|
||||||
|
@ -3,7 +3,6 @@ import {
|
|||||||
Component,
|
Component,
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
Input,
|
Input,
|
||||||
OnInit,
|
|
||||||
Output
|
Output
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
@ -14,13 +13,11 @@ import {
|
|||||||
templateUrl: './dialog-footer.component.html',
|
templateUrl: './dialog-footer.component.html',
|
||||||
styleUrls: ['./dialog-footer.component.scss']
|
styleUrls: ['./dialog-footer.component.scss']
|
||||||
})
|
})
|
||||||
export class DialogFooterComponent implements OnInit {
|
export class DialogFooterComponent {
|
||||||
@Input() deviceType: string;
|
@Input() deviceType: string;
|
||||||
|
|
||||||
@Output() closeButtonClicked = new EventEmitter<void>();
|
@Output() closeButtonClicked = new EventEmitter<void>();
|
||||||
|
|
||||||
public ngOnInit() {}
|
|
||||||
|
|
||||||
public onClickCloseButton() {
|
public onClickCloseButton() {
|
||||||
this.closeButtonClicked.emit();
|
this.closeButtonClicked.emit();
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,6 @@ import {
|
|||||||
Component,
|
Component,
|
||||||
EventEmitter,
|
EventEmitter,
|
||||||
Input,
|
Input,
|
||||||
OnInit,
|
|
||||||
Output
|
Output
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
@ -14,15 +13,13 @@ import {
|
|||||||
templateUrl: './dialog-header.component.html',
|
templateUrl: './dialog-header.component.html',
|
||||||
styleUrls: ['./dialog-header.component.scss']
|
styleUrls: ['./dialog-header.component.scss']
|
||||||
})
|
})
|
||||||
export class DialogHeaderComponent implements OnInit {
|
export class DialogHeaderComponent {
|
||||||
@Input() deviceType: string;
|
@Input() deviceType: string;
|
||||||
@Input() position: 'center' | 'left' = 'left';
|
@Input() position: 'center' | 'left' = 'left';
|
||||||
@Input() title: string;
|
@Input() title: string;
|
||||||
|
|
||||||
@Output() closeButtonClicked = new EventEmitter<void>();
|
@Output() closeButtonClicked = new EventEmitter<void>();
|
||||||
|
|
||||||
public ngOnInit() {}
|
|
||||||
|
|
||||||
public onClickCloseButton() {
|
public onClickCloseButton() {
|
||||||
this.closeButtonClicked.emit();
|
this.closeButtonClicked.emit();
|
||||||
}
|
}
|
||||||
|
@ -5,8 +5,7 @@ import {
|
|||||||
ChangeDetectionStrategy,
|
ChangeDetectionStrategy,
|
||||||
Component,
|
Component,
|
||||||
Input,
|
Input,
|
||||||
OnChanges,
|
OnChanges
|
||||||
OnInit
|
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -15,14 +14,12 @@ import {
|
|||||||
templateUrl: './fear-and-greed-index.component.html',
|
templateUrl: './fear-and-greed-index.component.html',
|
||||||
styleUrls: ['./fear-and-greed-index.component.scss']
|
styleUrls: ['./fear-and-greed-index.component.scss']
|
||||||
})
|
})
|
||||||
export class FearAndGreedIndexComponent implements OnChanges, OnInit {
|
export class FearAndGreedIndexComponent implements OnChanges {
|
||||||
@Input() fearAndGreedIndex: number;
|
@Input() fearAndGreedIndex: number;
|
||||||
|
|
||||||
public fearAndGreedIndexEmoji: string;
|
public fearAndGreedIndexEmoji: string;
|
||||||
public fearAndGreedIndexText: string;
|
public fearAndGreedIndexText: string;
|
||||||
|
|
||||||
public ngOnInit() {}
|
|
||||||
|
|
||||||
public ngOnChanges() {
|
public ngOnChanges() {
|
||||||
const { emoji, key } = resolveFearAndGreedIndex(this.fearAndGreedIndex);
|
const { emoji, key } = resolveFearAndGreedIndex(this.fearAndGreedIndex);
|
||||||
|
|
||||||
|
@ -28,8 +28,6 @@ export class LoginWithAccessTokenDialog {
|
|||||||
private tokenStorageService: TokenStorageService
|
private tokenStorageService: TokenStorageService
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
ngOnInit() {}
|
|
||||||
|
|
||||||
public onChangeStaySignedIn(aValue: MatCheckboxChange) {
|
public onChangeStaySignedIn(aValue: MatCheckboxChange) {
|
||||||
this.settingsStorageService.setSetting(
|
this.settingsStorageService.setSetting(
|
||||||
KEY_STAY_SIGNED_IN,
|
KEY_STAY_SIGNED_IN,
|
||||||
|
@ -8,7 +8,6 @@ import {
|
|||||||
EventEmitter,
|
EventEmitter,
|
||||||
Input,
|
Input,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
OnInit,
|
|
||||||
Output
|
Output
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { formatDistanceToNow } from 'date-fns';
|
import { formatDistanceToNow } from 'date-fns';
|
||||||
@ -19,7 +18,7 @@ import { formatDistanceToNow } from 'date-fns';
|
|||||||
templateUrl: './portfolio-summary.component.html',
|
templateUrl: './portfolio-summary.component.html',
|
||||||
styleUrls: ['./portfolio-summary.component.scss']
|
styleUrls: ['./portfolio-summary.component.scss']
|
||||||
})
|
})
|
||||||
export class PortfolioSummaryComponent implements OnChanges, OnInit {
|
export class PortfolioSummaryComponent implements OnChanges {
|
||||||
@Input() baseCurrency: string;
|
@Input() baseCurrency: string;
|
||||||
@Input() hasPermissionToUpdateUserSettings: boolean;
|
@Input() hasPermissionToUpdateUserSettings: boolean;
|
||||||
@Input() isLoading: boolean;
|
@Input() isLoading: boolean;
|
||||||
@ -35,8 +34,6 @@ export class PortfolioSummaryComponent implements OnChanges, OnInit {
|
|||||||
);
|
);
|
||||||
public timeInMarket: string;
|
public timeInMarket: string;
|
||||||
|
|
||||||
public ngOnInit() {}
|
|
||||||
|
|
||||||
public ngOnChanges() {
|
public ngOnChanges() {
|
||||||
if (this.summary) {
|
if (this.summary) {
|
||||||
if (this.summary.firstOrderDate) {
|
if (this.summary.firstOrderDate) {
|
||||||
|
@ -6,7 +6,6 @@ import {
|
|||||||
EventEmitter,
|
EventEmitter,
|
||||||
Input,
|
Input,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
OnInit,
|
|
||||||
Output
|
Output
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import { FormControl } from '@angular/forms';
|
import { FormControl } from '@angular/forms';
|
||||||
@ -17,7 +16,7 @@ import { FormControl } from '@angular/forms';
|
|||||||
templateUrl: './toggle.component.html',
|
templateUrl: './toggle.component.html',
|
||||||
styleUrls: ['./toggle.component.scss']
|
styleUrls: ['./toggle.component.scss']
|
||||||
})
|
})
|
||||||
export class ToggleComponent implements OnChanges, OnInit {
|
export class ToggleComponent implements OnChanges {
|
||||||
public static DEFAULT_DATE_RANGE_OPTIONS: ToggleOption[] = [
|
public static DEFAULT_DATE_RANGE_OPTIONS: ToggleOption[] = [
|
||||||
{ label: $localize`Today`, value: '1d' },
|
{ label: $localize`Today`, value: '1d' },
|
||||||
{ label: $localize`YTD`, value: 'ytd' },
|
{ label: $localize`YTD`, value: 'ytd' },
|
||||||
@ -34,8 +33,6 @@ export class ToggleComponent implements OnChanges, OnInit {
|
|||||||
|
|
||||||
public optionFormControl = new FormControl<string>(undefined);
|
public optionFormControl = new FormControl<string>(undefined);
|
||||||
|
|
||||||
public ngOnInit() {}
|
|
||||||
|
|
||||||
public ngOnChanges() {
|
public ngOnChanges() {
|
||||||
this.optionFormControl.setValue(this.defaultValue);
|
this.optionFormControl.setValue(this.defaultValue);
|
||||||
}
|
}
|
||||||
|
@ -9,8 +9,7 @@ import {
|
|||||||
ChangeDetectionStrategy,
|
ChangeDetectionStrategy,
|
||||||
ChangeDetectorRef,
|
ChangeDetectorRef,
|
||||||
Component,
|
Component,
|
||||||
OnDestroy,
|
OnDestroy
|
||||||
OnInit
|
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import {
|
import {
|
||||||
MatSnackBar,
|
MatSnackBar,
|
||||||
@ -27,7 +26,7 @@ import { catchError, switchMap, takeUntil } from 'rxjs/operators';
|
|||||||
styleUrls: ['./user-account-membership.scss'],
|
styleUrls: ['./user-account-membership.scss'],
|
||||||
templateUrl: './user-account-membership.html'
|
templateUrl: './user-account-membership.html'
|
||||||
})
|
})
|
||||||
export class UserAccountMembershipComponent implements OnDestroy, OnInit {
|
export class UserAccountMembershipComponent implements OnDestroy {
|
||||||
public baseCurrency: string;
|
public baseCurrency: string;
|
||||||
public coupon: number;
|
public coupon: number;
|
||||||
public couponId: string;
|
public couponId: string;
|
||||||
@ -88,8 +87,6 @@ export class UserAccountMembershipComponent implements OnDestroy, OnInit {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public ngOnInit() {}
|
|
||||||
|
|
||||||
public onCheckout() {
|
public onCheckout() {
|
||||||
this.dataService
|
this.dataService
|
||||||
.createCheckoutSession({ couponId: this.couponId, priceId: this.priceId })
|
.createCheckoutSession({ couponId: this.couponId, priceId: this.priceId })
|
||||||
|
@ -6,8 +6,7 @@ import {
|
|||||||
Component,
|
Component,
|
||||||
Input,
|
Input,
|
||||||
OnChanges,
|
OnChanges,
|
||||||
OnDestroy,
|
OnDestroy
|
||||||
OnInit
|
|
||||||
} from '@angular/core';
|
} from '@angular/core';
|
||||||
import svgMap from 'svgmap';
|
import svgMap from 'svgmap';
|
||||||
|
|
||||||
@ -17,7 +16,7 @@ import svgMap from 'svgmap';
|
|||||||
templateUrl: './world-map-chart.component.html',
|
templateUrl: './world-map-chart.component.html',
|
||||||
styleUrls: ['./world-map-chart.component.scss']
|
styleUrls: ['./world-map-chart.component.scss']
|
||||||
})
|
})
|
||||||
export class WorldMapChartComponent implements OnChanges, OnDestroy, OnInit {
|
export class WorldMapChartComponent implements OnChanges, OnDestroy {
|
||||||
@Input() countries: { [code: string]: { name?: string; value: number } };
|
@Input() countries: { [code: string]: { name?: string; value: number } };
|
||||||
@Input() format: string;
|
@Input() format: string;
|
||||||
@Input() isInPercent = false;
|
@Input() isInPercent = false;
|
||||||
@ -28,8 +27,6 @@ export class WorldMapChartComponent implements OnChanges, OnDestroy, OnInit {
|
|||||||
|
|
||||||
public constructor(private changeDetectorRef: ChangeDetectorRef) {}
|
public constructor(private changeDetectorRef: ChangeDetectorRef) {}
|
||||||
|
|
||||||
public ngOnInit() {}
|
|
||||||
|
|
||||||
public ngOnChanges() {
|
public ngOnChanges() {
|
||||||
// Create a copy before manipulating countries object
|
// Create a copy before manipulating countries object
|
||||||
this.countries = structuredClone(this.countries);
|
this.countries = structuredClone(this.countries);
|
||||||
|
@ -10,8 +10,6 @@ import { Subject } from 'rxjs';
|
|||||||
export class SelfHostingPageComponent implements OnDestroy {
|
export class SelfHostingPageComponent implements OnDestroy {
|
||||||
private unsubscribeSubject = new Subject<void>();
|
private unsubscribeSubject = new Subject<void>();
|
||||||
|
|
||||||
public ngOnInit() {}
|
|
||||||
|
|
||||||
public ngOnDestroy() {
|
public ngOnDestroy() {
|
||||||
this.unsubscribeSubject.next();
|
this.unsubscribeSubject.next();
|
||||||
this.unsubscribeSubject.complete();
|
this.unsubscribeSubject.complete();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Component, OnInit } from '@angular/core';
|
import { Component } from '@angular/core';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -8,11 +8,9 @@ import { Subject } from 'rxjs';
|
|||||||
styleUrls: ['./i18n-page.scss'],
|
styleUrls: ['./i18n-page.scss'],
|
||||||
templateUrl: './i18n-page.html'
|
templateUrl: './i18n-page.html'
|
||||||
})
|
})
|
||||||
export class GfI18nPageComponent implements OnInit {
|
export class GfI18nPageComponent {
|
||||||
private unsubscribeSubject = new Subject<void>();
|
private unsubscribeSubject = new Subject<void>();
|
||||||
|
|
||||||
public ngOnInit() {}
|
|
||||||
|
|
||||||
public ngOnDestroy() {
|
public ngOnDestroy() {
|
||||||
this.unsubscribeSubject.next();
|
this.unsubscribeSubject.next();
|
||||||
this.unsubscribeSubject.complete();
|
this.unsubscribeSubject.complete();
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
import { Component, OnDestroy, OnInit } from '@angular/core';
|
import { Component, OnDestroy } from '@angular/core';
|
||||||
import { Subject } from 'rxjs';
|
import { Subject } from 'rxjs';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
@ -7,11 +7,9 @@ import { Subject } from 'rxjs';
|
|||||||
styleUrls: ['./markets-page.scss'],
|
styleUrls: ['./markets-page.scss'],
|
||||||
templateUrl: './markets-page.html'
|
templateUrl: './markets-page.html'
|
||||||
})
|
})
|
||||||
export class MarketsPageComponent implements OnDestroy, OnInit {
|
export class MarketsPageComponent implements OnDestroy {
|
||||||
private unsubscribeSubject = new Subject<void>();
|
private unsubscribeSubject = new Subject<void>();
|
||||||
|
|
||||||
public ngOnInit() {}
|
|
||||||
|
|
||||||
public ngOnDestroy() {
|
public ngOnDestroy() {
|
||||||
this.unsubscribeSubject.next();
|
this.unsubscribeSubject.next();
|
||||||
this.unsubscribeSubject.complete();
|
this.unsubscribeSubject.complete();
|
||||||
|
@ -12,8 +12,6 @@ export class ShowAccessTokenDialog {
|
|||||||
|
|
||||||
public constructor(@Inject(MAT_DIALOG_DATA) public data: any) {}
|
public constructor(@Inject(MAT_DIALOG_DATA) public data: any) {}
|
||||||
|
|
||||||
ngOnInit() {}
|
|
||||||
|
|
||||||
public enableAgreeButton() {
|
public enableAgreeButton() {
|
||||||
this.isAgreeButtonDisabled = false;
|
this.isAgreeButtonDisabled = false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user