style: Clean up whitespace in component files
All checks were successful
CI / Get Changed Files (pull_request) Successful in 9s
CI / Docker backend validation (pull_request) Successful in 12s
CI / eslint (pull_request) Successful in 35s
CI / Docker frontend validation (pull_request) Successful in 52s
CI / oxlint (pull_request) Successful in 25s
CI / Checkstyle Main (pull_request) Successful in 55s
CI / prettier (pull_request) Successful in 21s
CI / test-build (pull_request) Successful in 31s
All checks were successful
CI / Get Changed Files (pull_request) Successful in 9s
CI / Docker backend validation (pull_request) Successful in 12s
CI / eslint (pull_request) Successful in 35s
CI / Docker frontend validation (pull_request) Successful in 52s
CI / oxlint (pull_request) Successful in 25s
CI / Checkstyle Main (pull_request) Successful in 55s
CI / prettier (pull_request) Successful in 21s
CI / test-build (pull_request) Successful in 31s
This commit is contained in:
parent
7aefe67aa0
commit
205bf1e52c
3 changed files with 9 additions and 9 deletions
|
@ -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) {
|
||||
|
|
|
@ -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);
|
||||
},
|
||||
|
|
|
@ -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);
|
||||
});
|
||||
}
|
||||
|
|
Reference in a new issue