feat(Variables) Added variable service and new game patch

This commit is contained in:
2022-04-18 18:28:56 -04:00
parent 72286f9f7b
commit c0c4e251a0
15 changed files with 86 additions and 10 deletions
+14 -2
View File
@@ -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();
}
}