Commit 6cd32dd5 authored by Emily Jensen's avatar Emily Jensen

Changed onInit to onDestroy and removed null from backup Code

parent 67b2abad
......@@ -4,7 +4,7 @@ import {
Output,
ChangeDetectionStrategy,
EventEmitter,
OnInit,
OnDestroy,
ViewChild,
ElementRef
} from "@angular/core";
......@@ -17,7 +17,7 @@ import { IForm } from "./manage-backup-code.reducer";
styleUrls: ["./manage-backup-code.component.scss"],
changeDetection: ChangeDetectionStrategy.OnPush
})
export class ManageBackupCodeComponent implements OnInit {
export class ManageBackupCodeComponent implements OnDestroy {
@Input()
form: FormGroupState<IForm>;
@Input()
......@@ -29,7 +29,7 @@ export class ManageBackupCodeComponent implements OnInit {
@Input()
nonFieldErrors: string[];
@Input()
backupCode: string | null;
backupCode: string;
@Output()
newBackupCode = new EventEmitter();
......@@ -52,9 +52,8 @@ export class ManageBackupCodeComponent implements OnInit {
}
}
ngOnInit() {
ngOnDestroy() {
this.reset.emit();
this.passwordInput.nativeElement.focus();
}
constructor() {}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment