This repository has been archived on 2025-02-19. You can view files and clone it, but cannot push or open issues or pull requests.
casino/frontend/src/app/feature/home/home.component.ts
2025-02-13 11:35:30 +01:00

26 lines
746 B
TypeScript

import {ChangeDetectionStrategy, Component, inject} from '@angular/core';
import {KeycloakService} from 'keycloak-angular';
import {MatDialog} from "@angular/material/dialog";
import {DepositComponent} from "../deposit/deposit.component";
@Component({
selector: 'app-homepage',
standalone: true,
imports: [],
templateUrl: './home.component.html',
changeDetection: ChangeDetectionStrategy.OnPush,
})
export class HomeComponent {
private keycloakService: KeycloakService = inject(KeycloakService);
public dialog: MatDialog = inject(MatDialog);
public logout() {
const baseUrl = window.location.origin;
this.keycloakService.logout(`${baseUrl}/`);
}
public openDialog() {
this.dialog.open(DepositComponent);
}
}