mirror of
https://github.com/bitwarden/browser
synced 2026-02-20 11:24:07 +00:00
Refactor SingleSignOnComponent to remove OnInit lifecycle and debug logging
- Simplified SingleSignOnComponent by removing the OnInit implementation. - Eliminated debug logging for integrations in ngOnInit. - Cleaned up imports for better readability.
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
import { Component, OnInit } from "@angular/core";
|
||||
import { Component } from "@angular/core";
|
||||
|
||||
import { IntegrationType } from "@bitwarden/common/enums/integration-type.enum";
|
||||
import { SharedModule } from "@bitwarden/web-vault/app/shared";
|
||||
|
||||
import { takeUntilDestroyed } from "@angular/core/rxjs-interop";
|
||||
import { IntegrationGridComponent } from "../integration-grid/integration-grid.component";
|
||||
import { FilterIntegrationsPipe } from "../integrations.pipe";
|
||||
import { OrganizationIntegrationsState } from "../organization-integrations.state";
|
||||
import { tap } from "rxjs/operators";
|
||||
|
||||
// FIXME(https://bitwarden.atlassian.net/browse/CL-764): Migrate to OnPush
|
||||
// eslint-disable-next-line @angular-eslint/prefer-on-push-component-change-detection
|
||||
@@ -16,21 +14,9 @@ import { tap } from "rxjs/operators";
|
||||
templateUrl: "single-sign-on.component.html",
|
||||
imports: [SharedModule, IntegrationGridComponent, FilterIntegrationsPipe],
|
||||
})
|
||||
export class SingleSignOnComponent implements OnInit {
|
||||
export class SingleSignOnComponent {
|
||||
integrationsList$ = this.state.integrations$;
|
||||
IntegrationType = IntegrationType;
|
||||
|
||||
constructor(private state: OrganizationIntegrationsState) {}
|
||||
|
||||
ngOnInit() {
|
||||
// eslint-disable-next-line no-console
|
||||
this.integrationsList$
|
||||
.pipe(
|
||||
tap((integrations) =>
|
||||
console.log("[DEBUG] integrations in single-sign-on.component.ts =>", integrations),
|
||||
),
|
||||
)
|
||||
.pipe(takeUntilDestroyed())
|
||||
.subscribe();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user