@using OnProfNext.Client.Services @inherits LayoutComponentBase @inject NavigationManager Nav @inject AuthService AuthService
@Body
@code { private string? username; protected override async Task OnInitializedAsync() { username = await AuthService.GetUsernameAsync(); if (string.IsNullOrEmpty(username)) username = "Gast"; } private async Task Logout() { await AuthService.LogoutAsync(); Nav.NavigateTo("/login", forceLoad: true); } }