optimized api calls by moving api call to individual components and improved performance
This commit is contained in:
@@ -17,8 +17,16 @@ export class ContactSidebarComponent extends BaseComponent<ISideBar> implements
|
||||
}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.svc.baseSubject.subscribe((resume: ICv | unknown) =>{
|
||||
this.assignData(resume);
|
||||
// this.svc.baseSubject.subscribe((resume: ICv | unknown) =>{
|
||||
// this.assignData(resume);
|
||||
// });
|
||||
this.getCandidateAndSocialLinks();
|
||||
}
|
||||
|
||||
getCandidateAndSocialLinks(){
|
||||
this.svc.getCandidateWithSocialLinks(this.candidateId).subscribe((response: ISideBar) => {
|
||||
this.svc.candidateAndSocialLinks = this.svc.candidateAndSocialLinks ?? response;
|
||||
this.assignData(response);
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user