change
This commit is contained in:
@@ -1,23 +1,31 @@
|
||||
@inject IAuthenticationClientService AuthenticationClientService
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
<MudPaper Class=@Class Style=@Style>
|
||||
|
||||
<AuthorizeView>
|
||||
<Authorized>
|
||||
<MudText>
|
||||
Hello, @context.User.Identity.Name!
|
||||
</MudText>
|
||||
<MudButton OnClick="Logout"> LOGOUT </MudButton>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
<MudButton Class="" Href="Register"> Register </MudButton>
|
||||
<MudButton Class="" Href="Login"> Login </MudButton>
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
<AuthorizeView>
|
||||
<Authorized>
|
||||
<MudText>
|
||||
Hello, @context.User.Identity.Name!
|
||||
</MudText>
|
||||
<MudButton OnClick="Logout"> LOGOUT </MudButton>
|
||||
</Authorized>
|
||||
<NotAuthorized>
|
||||
<MudButton Class="" Href="Register"> Register </MudButton>
|
||||
<MudButton Class="" Href="Login"> Login </MudButton>
|
||||
</NotAuthorized>
|
||||
</AuthorizeView>
|
||||
|
||||
</MudPaper>
|
||||
|
||||
@code {
|
||||
|
||||
[Parameter]
|
||||
public string? Class { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public string? Style { get; set; }
|
||||
|
||||
private async Task Logout()
|
||||
{
|
||||
await AuthenticationClientService.LogoutAsync();
|
||||
|
Reference in New Issue
Block a user