From ebdb76bf7ec75df3367e474e6f3a78f6bd5f34f0 Mon Sep 17 00:00:00 2001 From: sanchezvem Date: Wed, 15 Apr 2026 15:39:17 +0100 Subject: [PATCH] Fixed error with loading --- src/app/pages/login/login.component.ts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/src/app/pages/login/login.component.ts b/src/app/pages/login/login.component.ts index 36adc85..c593897 100644 --- a/src/app/pages/login/login.component.ts +++ b/src/app/pages/login/login.component.ts @@ -82,12 +82,6 @@ export class LoginComponent implements OnInit { } async addUser() { - const loading = await this.loadCtrl.create({ - message: 'Connexion...', - spinner: 'lines-sharp-small' - }); - await loading.present(); - if (this.user().userForm.invalid) { const toast = await this.toastCtrl.create({ message: 'Tout les champs sont requis', @@ -97,6 +91,13 @@ export class LoginComponent implements OnInit { await toast.present(); return false; } + + const loading = await this.loadCtrl.create({ + message: 'Création du compte...', + spinner: 'lines-sharp-small' + }); + await loading.present(); + try { const users = this.user().userForm.getRawValue(); await firstValueFrom(this.usersService.createUserEndpoint(users));