refactor: remove unused parameters and improve formatting

This commit is contained in:
Constantin Simonis 2025-05-07 15:30:57 +02:00
commit 851cfe1bc8
No known key found for this signature in database
GPG key ID: 3878FF77C24AF4D2
5 changed files with 28 additions and 18 deletions

View file

@ -11,18 +11,24 @@
<p class="bonus-description">+ 200 Freispiele</p>
<div class="flex justify-center space-x-4 mt-6">
<a
routerLink="/register"
class="w-full sm:w-auto button-primary px-6 sm:px-8 py-3 shadow-lg"
>
Konto erstellen
</a>
<a
routerLink="/login"
class="w-full sm:w-auto bg-slate-700 text-white hover:bg-slate-600 px-6 sm:px-8 py-3 shadow-lg rounded"
>
Anmelden
</a>
@if (authService.isLoggedIn()) {
<a routerLink="/home" class="w-full sm:w-auto button-primary px-6 sm:px-8 py-3 shadow-lg">
Spiele
</a>
} @else {
<a
routerLink="/register"
class="w-full sm:w-auto button-primary px-6 sm:px-8 py-3 shadow-lg"
>
Konto erstellen
</a>
<a
routerLink="/login"
class="w-full sm:w-auto bg-slate-700 text-white hover:bg-slate-600 px-6 sm:px-8 py-3 shadow-lg rounded"
>
Anmelden
</a>
}
</div>
</div>

View file

@ -1,7 +1,8 @@
import { ChangeDetectionStrategy, Component, OnDestroy, OnInit } from '@angular/core';
import { ChangeDetectionStrategy, Component, inject, OnDestroy, OnInit } from '@angular/core';
import { NgFor } from '@angular/common';
import { NavbarComponent } from '@shared/components/navbar/navbar.component';
import { RouterLink } from '@angular/router';
import { AuthService } from '@service/auth.service';
@Component({
selector: 'app-landing-page',
@ -13,6 +14,7 @@ import { RouterLink } from '@angular/router';
export class LandingComponent implements OnInit, OnDestroy {
currentSlide = 0;
private autoplayInterval: ReturnType<typeof setInterval> | undefined;
authService: AuthService = inject(AuthService);
ngOnInit() {
this.startAutoplay();