-
Notifications
You must be signed in to change notification settings - Fork 127
Expand file tree
/
Copy pathApp.razor
More file actions
28 lines (24 loc) · 840 Bytes
/
App.razor
File metadata and controls
28 lines (24 loc) · 840 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<CascadingAuthenticationState>
<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>
</CascadingAuthenticationState>
@inject UserAgentContext UserAgentContext
@code {
[Parameter]
public string UserAgent { get; set; }
protected override Task OnInitializedAsync()
{
UserAgentContext.UserAgent = UserAgent;
return base.OnInitializedAsync();
}
}