feat(Variables) Added variable service and new game patch
This commit is contained in:
+14
-2
@@ -1,9 +1,13 @@
|
||||
@inject HttpClient httpClient
|
||||
@inject IVariableService variableService
|
||||
|
||||
<Router AppAssembly="@typeof(App).Assembly">
|
||||
<Found Context="routeData">
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
|
||||
<FocusOnNavigate RouteData="@routeData" Selector="h1"/>
|
||||
@if (isLoaded)
|
||||
{
|
||||
<RouteView RouteData="@routeData" DefaultLayout="@typeof(MainLayout)"/>
|
||||
<FocusOnNavigate RouteData="@routeData" Selector="h1"/>
|
||||
}
|
||||
</Found>
|
||||
<NotFound>
|
||||
<PageTitle>Not found</PageTitle>
|
||||
@@ -68,5 +72,13 @@
|
||||
</style>
|
||||
|
||||
@code {
|
||||
private bool isLoaded = false;
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
await variableService.Load();
|
||||
isLoaded = true;
|
||||
StateHasChanged();
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user