yep
This commit is contained in:
@@ -5,10 +5,10 @@
|
||||
<h1>Shogi</h1>
|
||||
@if (user != null)
|
||||
{
|
||||
<div class="user">
|
||||
<div>@user.Value.DisplayName</div>
|
||||
<button type="button" class="logout" @onclick="AccountManager.LogoutAsync">Logout</button>
|
||||
</div>
|
||||
<div class="user">
|
||||
<div>@user.Value.DisplayName</div>
|
||||
<button type="button" class="logout" @onclick="AccountManager.LogoutAsync">Logout</button>
|
||||
</div>
|
||||
}
|
||||
@*<LoginDisplay />*@
|
||||
</div>
|
||||
@@ -21,11 +21,12 @@
|
||||
Account.LoginChangedEvent += OnLoginChange;
|
||||
}
|
||||
|
||||
private void OnLoginChange(object? sender, LoginEventArgs args)
|
||||
private Task OnLoginChange(LoginEventArgs args)
|
||||
{
|
||||
if (args == null)
|
||||
throw new ArgumentException(nameof(args));
|
||||
user = args.User;
|
||||
StateHasChanged();
|
||||
return Task.CompletedTask;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user