Skip to content

Commit

Permalink
Fix minor issues on login page
Browse files Browse the repository at this point in the history
  • Loading branch information
yksolanki9 committed Dec 31, 2022
1 parent d02505d commit 4e98975
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/app/auth/login/login.page.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
color="dark"
expand="block"
size="large"
[disabled]="!fg.valid"
>
LOGIN
</ion-button>
Expand Down
6 changes: 3 additions & 3 deletions src/app/auth/login/login.page.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ export class LoginPage implements OnInit {
});
}

async showErrorMessage(error) {
async showErrorMessage(errorMessage) {
const errorToast = await this.toastController.create({
message: error.error,
message: errorMessage || 'Something went wrong',
position: 'bottom',
duration: 3000,
icon: 'warning',
Expand All @@ -61,7 +61,7 @@ export class LoginPage implements OnInit {
.pipe(finalize(() => this.loaderService.hideLoader()))
.subscribe({
next: () => this.router.navigate(['/home']),
error: (err) => this.showErrorMessage(err),
error: (err) => this.showErrorMessage(err?.error?.message),
});
}
}

0 comments on commit 4e98975

Please sign in to comment.