From 205bf1e52c8f2e2ae73e1fbd0759bb203a07420e Mon Sep 17 00:00:00 2001 From: Jan-Marlon Leibl Date: Wed, 7 May 2025 17:56:12 +0200 Subject: [PATCH] style: Clean up whitespace in component files --- .../app/feature/game/blackjack/blackjack.component.ts | 10 +++++----- frontend/src/app/feature/game/slots/slots.component.ts | 6 +++--- frontend/src/app/service/user.service.ts | 2 +- 3 files changed, 9 insertions(+), 9 deletions(-) diff --git a/frontend/src/app/feature/game/blackjack/blackjack.component.ts b/frontend/src/app/feature/game/blackjack/blackjack.component.ts index 56207b7..973754a 100644 --- a/frontend/src/app/feature/game/blackjack/blackjack.component.ts +++ b/frontend/src/app/feature/game/blackjack/blackjack.component.ts @@ -57,7 +57,7 @@ export default class BlackjackComponent implements OnInit { this.balance.set(user.balance); } }); - + // Subscribe to user updates for real-time balance changes this.userService.currentUser$.subscribe((user) => { if (user) { @@ -92,7 +92,7 @@ export default class BlackjackComponent implements OnInit { if (isGameOver) { console.log('Game is over, state:', game.state); this.userService.refreshCurrentUser(); - + // Get the latest balance before showing the result dialog timer(1000).subscribe(() => { this.userService.getCurrentUser().subscribe((user) => { @@ -183,7 +183,7 @@ export default class BlackjackComponent implements OnInit { this.blackjackService.doubleDown(this.currentGameId()!).subscribe({ next: (game) => { this.updateGameState(game); - + // Wait a bit to ensure the backend has finished processing timer(1000).subscribe(() => { this.userService.getCurrentUser().subscribe((user) => { @@ -196,7 +196,7 @@ export default class BlackjackComponent implements OnInit { } }); }); - + this.isActionInProgress.set(false); }, error: (error) => { @@ -210,7 +210,7 @@ export default class BlackjackComponent implements OnInit { onCloseGameResult(): void { console.log('Closing game result dialog'); this.showGameResult.set(false); - + // Refresh the balance when dialog is closed and update local state this.userService.getCurrentUser().subscribe((user) => { if (user) { diff --git a/frontend/src/app/feature/game/slots/slots.component.ts b/frontend/src/app/feature/game/slots/slots.component.ts index b43e8f0..e395cd0 100644 --- a/frontend/src/app/feature/game/slots/slots.component.ts +++ b/frontend/src/app/feature/game/slots/slots.component.ts @@ -109,13 +109,13 @@ export default class SlotsComponent implements OnInit, OnDestroy { next: (result) => { setTimeout(() => { this.slotResult.set(result); - + if (result.status === 'win') { this.userService.updateLocalBalance(result.amount); } - + this.userService.refreshCurrentUser(); - + this.isSpinning = false; }, 1500); }, diff --git a/frontend/src/app/service/user.service.ts b/frontend/src/app/service/user.service.ts index 88db765..5233d00 100644 --- a/frontend/src/app/service/user.service.ts +++ b/frontend/src/app/service/user.service.ts @@ -21,7 +21,7 @@ export class UserService { } // Subscribe to auth service user updates - this.authService.userSubject.subscribe(user => { + this.authService.userSubject.subscribe((user) => { this.currentUserSubject.next(user); }); }