Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
@inject NavigationManager Navigation
@inject SignOutSessionStateManager SignOutManager

<div class="user-info">
<div class="user-info">
<AuthorizeView>
<Authorizing>
<text>...</text>
Expand All @@ -18,12 +15,4 @@
<a class="sign-in" href="authentication/login">Log in</a>
</NotAuthorized>
</AuthorizeView>
</div>

@code{
async Task BeginSignOut()
{
await SignOutManager.SetSignOutState();
Navigation.NavigateTo("authentication/logout");
}
}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing using directive for System.Threading.Tasks. The Task type used in the async BeginSignOut method (line 22) requires an explicit using directive. Other files in this project (e.g., OrdersClient.cs, Program.cs) explicitly include this using statement, and it should be added here for consistency and to ensure compilation succeeds across all target frameworks, especially when implicit usings may not be enabled.

Suggested change
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
using System.Threading.Tasks;

Copilot uses AI. Check for mistakes.

namespace BlazingPizza.Client.Shared;

public partial class LoginDisplay
{
[Inject]
private NavigationManager Navigation { get; set; } = default!;

#if !NET11_0_OR_GREATER
[Inject]
private SignOutSessionStateManager SignOutManager { get; set; } = default!;
#endif

#if NET11_0_OR_GREATER
private void BeginSignOut()
{
Navigation.NavigateToLogout("authentication/logout");
}
#else
private async Task BeginSignOut()
{
await SignOutManager.SetSignOutState();
Navigation.NavigateTo("authentication/logout");
}
#endif
}
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
@inject NavigationManager Navigation
@inject SignOutSessionStateManager SignOutManager

<div class="user-info">
<div class="user-info">
<AuthorizeView>
<Authorizing>
<text>...</text>
Expand All @@ -18,12 +15,4 @@
<a class="sign-in" href="authentication/login">Log in</a>
</NotAuthorized>
</AuthorizeView>
</div>

@code{
async Task BeginSignOut()
{
await SignOutManager.SetSignOutState();
Navigation.NavigateTo("authentication/logout");
}
}
</div>
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
using Microsoft.AspNetCore.Components;
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
Copy link

Copilot AI Jan 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing using directive for System.Threading.Tasks. The Task type used in the async BeginSignOut method (line 22) requires an explicit using directive. Other files in this project (e.g., OrdersClient.cs, Program.cs) explicitly include this using statement, and it should be added here for consistency and to ensure compilation succeeds across all target frameworks, especially when implicit usings may not be enabled.

Suggested change
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
using Microsoft.AspNetCore.Components.WebAssembly.Authentication;
using System.Threading.Tasks;

Copilot uses AI. Check for mistakes.

namespace BlazingPizza.Client.Shared;

public partial class LoginDisplay
{
[Inject]
private NavigationManager Navigation { get; set; } = default!;

#if !NET11_0_OR_GREATER
[Inject]
private SignOutSessionStateManager SignOutManager { get; set; } = default!;
#endif

#if NET11_0_OR_GREATER
private void BeginSignOut()
{
Navigation.NavigateToLogout("authentication/logout");
}
#else
private async Task BeginSignOut()
{
await SignOutManager.SetSignOutState();
Navigation.NavigateTo("authentication/logout");
}
#endif
}
Loading