@layout LoginLayout
@page "/logout"
@using FoodsharingSiegen.Server.Service
@using FoodsharingSiegen.Server.Auth

@inject AuthService AuthService
@inject NavigationManager NavigationManager

@code {

    protected override async Task OnInitializedAsync()
    {
        var logoutR = await AuthService.Logout();
        if(logoutR.Success) NavigationManager.NavigateTo("/");
    }

}