添加项目文件。
This commit is contained in:
26
TechHelper.Client/Shared/AccountLayout.razor
Normal file
26
TechHelper.Client/Shared/AccountLayout.razor
Normal file
@@ -0,0 +1,26 @@
|
||||
@inherits LayoutComponentBase
|
||||
@layout TechHelper.Client.Layout.MainLayout
|
||||
@inject NavigationManager NavigationManager
|
||||
|
||||
|
||||
@if (authenticationStateTask is null)
|
||||
{
|
||||
<p>Loading...</p>
|
||||
}
|
||||
else
|
||||
{
|
||||
@Body
|
||||
}
|
||||
|
||||
@code {
|
||||
[CascadingParameter]
|
||||
private Task<AuthenticationState> authenticationStateTask { get; set; }
|
||||
|
||||
protected override void OnParametersSet()
|
||||
{
|
||||
if (authenticationStateTask is null)
|
||||
{
|
||||
NavigationManager.Refresh(forceReload: true);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user