refacto page mon profile
This commit is contained in:
@@ -35,10 +35,10 @@ export class UserFormComponent implements OnInit {
|
||||
|
||||
ngOnInit(): void {
|
||||
this.userForm = this.fb.group({
|
||||
firstname: new FormControl(this.user?.name!.split(' ').slice(0, -1).join(' ') ?? '', [
|
||||
firstname: new FormControl(this.user?.name?.split(' ').slice(0, -1).join(' ') ?? '', [
|
||||
Validators.required,
|
||||
]),
|
||||
name: new FormControl(this.user?.name!.split(' ').slice(-1)[0] ?? '', [Validators.required]),
|
||||
name: new FormControl(this.user?.name?.split(' ').slice(-1)[0] ?? '', [Validators.required]),
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user