Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
ysmoradi committed Sep 14, 2024
1 parent 2dada3c commit 86d8803
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ protected override async Task OnInitializedAsync()
{
try
{
authManager.AuthenticationStateChanged += IsUserAuthenticated;
authManager.AuthenticationStateChanged += AuthenticationStateChanged;

isUserAuthenticated = await prerenderStateService.GetValue(async () => (await AuthenticationStateTask).User.IsAuthenticated());

Expand Down Expand Up @@ -64,7 +64,7 @@ private void ToggleMenuHandler()
isMenuOpen = !isMenuOpen;
}

private async void IsUserAuthenticated(Task<AuthenticationState> task)
private async void AuthenticationStateChanged(Task<AuthenticationState> task)
{
try
{
Expand All @@ -91,7 +91,7 @@ protected virtual void Dispose(bool disposing)
{
if (disposed || disposing is false) return;

authManager.AuthenticationStateChanged -= IsUserAuthenticated;
authManager.AuthenticationStateChanged -= AuthenticationStateChanged;

unsubscribeCultureChange();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@ protected async override Task OnAfterFirstRenderAsync()
{
await base.OnAfterFirstRenderAsync();

authManager.AuthenticationStateChanged += IsUserAuthenticated;
authManager.AuthenticationStateChanged += AuthenticationStateChanged;

await ConnectSignalR();
}

private async void IsUserAuthenticated(Task<AuthenticationState> task)
private async void AuthenticationStateChanged(Task<AuthenticationState> task)
{
try
{
Expand Down

0 comments on commit 86d8803

Please sign in to comment.