Skip to content

Commit d7d1b92

Browse files
committed
fix(package): adjusted the snackbar msg on deleting the user
1 parent ec129d8 commit d7d1b92

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/module/components/ngx-auth-firebaseui-user/user.component.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
import {Component, EventEmitter, Inject, Input, OnInit, Output} from '@angular/core';
1+
import {Component, EventEmitter, Inject, Input, Output} from '@angular/core';
22
import {AngularFireAuth} from '@angular/fire/auth';
33
import {MatFormFieldAppearance, MatSnackBar} from '@angular/material';
44
import {AuthProcessService} from '../../services/auth-process.service';
5-
import {AbstractControl, FormControl, FormGroup, Validators} from '@angular/forms';
5+
import {FormControl, FormGroup, Validators} from '@angular/forms';
66
import {EMAIL_REGEX, PHONE_NUMBER_REGEX} from '../ngx-auth-firebaseui/auth.component';
77
import {User} from 'firebase';
88
import {FirestoreSyncService} from '../../services/firestore-sync.service';
@@ -160,12 +160,13 @@ export class UserComponent {
160160
}
161161
this.onAccountDeleted.emit();
162162
this.editMode = false;
163+
console.log('Your account has been successfully deleted!');
163164
this.snackBar.open('Your account has been successfully deleted!', 'OK', {
164165
duration: 5000
165166
})
166167
} catch (error) {
167-
console.log('Error while delete ngx-auth-firebaseui-user\'s account', error);
168-
this.snackBar.open('Error occurred while deleting your account!', 'OK', {
168+
console.log('Error while delete user account', error);
169+
this.snackBar.open(`Error occurred while deleting your account: ${error.message}`, 'OK', {
169170
duration: 5000
170171
})
171172
}

0 commit comments

Comments
 (0)