From 28f7b15d4cef755fb41a92512f2efe25dab59942 Mon Sep 17 00:00:00 2001 From: Jan-Marlon Leibl Date: Thu, 3 Apr 2025 10:03:37 +0200 Subject: [PATCH] refactor: remove unnecessary comments and variables --- .../components/animated-number/animated-number.component.ts | 6 +----- frontend/src/app/service/user.service.ts | 1 - 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/frontend/src/app/feature/game/blackjack/components/animated-number/animated-number.component.ts b/frontend/src/app/feature/game/blackjack/components/animated-number/animated-number.component.ts index aa4c1b6..b9fc011 100644 --- a/frontend/src/app/feature/game/blackjack/components/animated-number/animated-number.component.ts +++ b/frontend/src/app/feature/game/blackjack/components/animated-number/animated-number.component.ts @@ -34,14 +34,11 @@ export class AnimatedNumberComponent implements OnChanges, AfterViewInit { ngOnChanges(changes: SimpleChanges): void { if (changes['value']) { if (this.countUp) { - const startVal = this.previousValue; const endVal = this.value; - // Update the CountUp instance with new start and end values this.countUp.update(endVal); this.previousValue = endVal; } else { - // Format the initial value if CountUp is not yet initialized this.formattedValue = new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR', @@ -58,11 +55,10 @@ export class AnimatedNumberComponent implements OnChanges, AfterViewInit { startVal: this.previousValue, duration: this.duration, easingFn: (t, b, c, d) => { - // Custom easing function based on the input ease type if (this.ease === 'power1.out') { return c * (1 - Math.pow(1 - t / d, 1)) + b; } - return c * (t / d) + b; // linear fallback + return c * (t / d) + b; }, formattingFn: (value) => { const formatted = new Intl.NumberFormat('de-DE', { diff --git a/frontend/src/app/service/user.service.ts b/frontend/src/app/service/user.service.ts index 2ad53ce..1e801c6 100644 --- a/frontend/src/app/service/user.service.ts +++ b/frontend/src/app/service/user.service.ts @@ -13,7 +13,6 @@ export class UserService { public currentUser$ = this.currentUserSubject.asObservable(); constructor() { - // Initialize with current user data this.getCurrentUser().subscribe(); }