You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
33 lines
890 B
33 lines
890 B
using HeartTrack.Services;
|
|
using Microsoft.AspNetCore.Components.Authorization;
|
|
using Microsoft.AspNetCore.Components;
|
|
|
|
namespace HeartTrack.Shared
|
|
{
|
|
public partial class MainLayout
|
|
{
|
|
/*[Inject]
|
|
public CustomStateProvider AuthStateProvider { get; set; }*/
|
|
|
|
[Inject]
|
|
public NavigationManager NavigationManager { get; set; }
|
|
|
|
[CascadingParameter]
|
|
private Task<AuthenticationState> AuthenticationState { get; set; }
|
|
|
|
/*protected override async Task OnParametersSetAsync()
|
|
{
|
|
if (!(await AuthenticationState).User.Identity.IsAuthenticated)
|
|
{
|
|
NavigationManager.NavigateTo("/login");
|
|
}
|
|
}*/
|
|
|
|
/*private async Task LogoutClick()
|
|
{
|
|
await AuthStateProvider.Logout();
|
|
NavigationManager.NavigateTo("/login");
|
|
}*/
|
|
}
|
|
}
|