17 lines
426 B
Plaintext
17 lines
426 B
Plaintext
@inject NavigationManager Nav
|
|
@inject OnProfNext.Client.Services.AuthService AuthService
|
|
|
|
@code {
|
|
protected override async Task OnInitializedAsync()
|
|
{
|
|
var loggedIn = await AuthService.IsLoggedInAsync();
|
|
if (!loggedIn)
|
|
{
|
|
Nav.NavigateTo("/login", forceLoad: true);
|
|
}
|
|
else
|
|
{
|
|
Nav.NavigateTo("/", forceLoad: true);
|
|
}
|
|
}
|
|
} |