refactor: remove unused parameters and improve formatting
This commit is contained in:
parent
1111c91407
commit
851cfe1bc8
5 changed files with 28 additions and 18 deletions
|
@ -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>
|
||||
|
||||
|
|
|
@ -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();
|
||||
|
|
Reference in a new issue