Skip to content

Commit

Permalink
refactor(SSR): 🚧 removing window.getComputedStyle()
Browse files Browse the repository at this point in the history
  • Loading branch information
juamber-rgs committed Jan 28, 2024
1 parent db80f70 commit 3d58c7c
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/app/shared/directives/loading.directive.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,9 @@ export class LoadingDirective implements AfterViewInit {
skeletonComponentRef: ComponentRef<Skeleton> | undefined;

ngAfterViewInit(): void {
this.ref.detectChanges();
this.fontSizeValue = parseFloat(window.getComputedStyle(this.elementRef.nativeElement).fontSize) / 2;

this.isLoading$.subscribe((isLoading) => {
this.handleLoading(isLoading);
this.ref.detectChanges();
});
}

Expand Down

0 comments on commit 3d58c7c

Please sign in to comment.