|
1 | | -import {Component, EventEmitter, Inject, Input, OnInit, Output} from '@angular/core'; |
| 1 | +import {Component, EventEmitter, Inject, Input, Output} from '@angular/core'; |
2 | 2 | import {AngularFireAuth} from '@angular/fire/auth'; |
3 | 3 | import {MatFormFieldAppearance, MatSnackBar} from '@angular/material'; |
4 | 4 | import {AuthProcessService} from '../../services/auth-process.service'; |
5 | | -import {AbstractControl, FormControl, FormGroup, Validators} from '@angular/forms'; |
| 5 | +import {FormControl, FormGroup, Validators} from '@angular/forms'; |
6 | 6 | import {EMAIL_REGEX, PHONE_NUMBER_REGEX} from '../ngx-auth-firebaseui/auth.component'; |
7 | 7 | import {User} from 'firebase'; |
8 | 8 | import {FirestoreSyncService} from '../../services/firestore-sync.service'; |
@@ -160,12 +160,13 @@ export class UserComponent { |
160 | 160 | } |
161 | 161 | this.onAccountDeleted.emit(); |
162 | 162 | this.editMode = false; |
| 163 | + console.log('Your account has been successfully deleted!'); |
163 | 164 | this.snackBar.open('Your account has been successfully deleted!', 'OK', { |
164 | 165 | duration: 5000 |
165 | 166 | }) |
166 | 167 | } 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', { |
169 | 170 | duration: 5000 |
170 | 171 | }) |
171 | 172 | } |
|
0 commit comments