style: fix formatting and add missing commas in code
All checks were successful
CI / Get Changed Files (pull_request) Successful in 18s
CI / Checkstyle Main (pull_request) Has been skipped
CI / Docker backend validation (pull_request) Successful in 15s
CI / Docker frontend validation (pull_request) Successful in 52s
CI / oxlint (pull_request) Successful in 29s
CI / eslint (pull_request) Successful in 38s
CI / prettier (pull_request) Successful in 30s
CI / test-build (pull_request) Successful in 46s

This commit is contained in:
Jan-Marlon Leibl 2025-05-07 15:30:40 +02:00
commit c92a182123
Signed by: jleibl
GPG key ID: 300B2F906DC6F1D5
6 changed files with 21 additions and 21 deletions

View file

@ -95,7 +95,7 @@ export default class LootboxSelectionComponent implements OnInit {
ngOnInit(): void {
this.loadLootboxes();
this.userService.currentUser$.subscribe(user => {
this.userService.currentUser$.subscribe((user) => {
this.currentUser = user;
this.cdr.detectChanges();
});
@ -128,12 +128,12 @@ export default class LootboxSelectionComponent implements OnInit {
}
openLootbox(lootboxId: number): void {
const lootbox = this.lootboxes.find(box => box.id === lootboxId);
const lootbox = this.lootboxes.find((box) => box.id === lootboxId);
if (!lootbox) {
return;
}
if (!this.currentUser || this.currentUser.balance < lootbox.price) {
this.error = 'Nicht genug Guthaben, um diese Lootbox zu öffnen.';
// Scroll to top to see the error message
@ -145,7 +145,7 @@ export default class LootboxSelectionComponent implements OnInit {
}, 5000);
return;
}
this.router.navigate(['/game/lootboxes/open', lootboxId]);
}