@inherits LayoutComponentBase
@layout TechHelper.Client.Layout.MainLayout
@inject NavigationManager NavigationManager


@if (authenticationStateTask is null)
{
    <p>Loading...</p>
}
else
{
    @Body
}

@code {
    [CascadingParameter]
    private Task<AuthenticationState> authenticationStateTask { get; set; }

    protected override void OnParametersSet()
    {
        if (authenticationStateTask is null)
        {
            NavigationManager.Refresh(forceReload: true);
        }
    }
}
