Files
jsmr/JSMR.UI.Blazor/App.razor

30 lines
855 B
Plaintext

@using JSMR.UI.Blazor.Components.Authentication
@using JSMR.UI.Blazor.Services
@inject SessionState Session
<HeadContent>
<RadzenTheme Theme="material-dark" />
</HeadContent>
<AuthenticationGate>
<Router AppAssembly="@typeof(App).Assembly">
<Found Context="routeData">
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)" />
<FocusOnNavigate RouteData="@routeData" Selector="h1" />
</Found>
<NotFound>
<PageTitle>Not found</PageTitle>
<LayoutView Layout="@typeof(MainLayout)">
<p role="alert">Sorry, there's nothing at this address.</p>
</LayoutView>
</NotFound>
</Router>
</AuthenticationGate>
@code {
protected override async Task OnInitializedAsync()
{
//await Session.RefreshAsync();
}
}