Fixed error with loading

This commit is contained in:
2026-04-15 15:39:17 +01:00
parent ad4a530fb3
commit ebdb76bf7e
+7 -6
View File
@@ -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));