mirror of
https://github.com/DrMboga/WotBlitzStatisticsBlazor.git
synced 2026-10-21 10:27:18 +02:00
chore: infrastructure code
This commit is contained in:
1 parent
44c89f2e5d
commit
14aae034af
7 files changed
+63
-3
No files matched your search
@@ -1,11 +1,34 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using WotBlitzStatisticsPro.Blazor.GraphQl;
|
||||
using WotBlitzStatisticsPro.Blazor.Services;
|
||||
|
||||
namespace WotBlitzStatisticsPro.Blazor.Pages
|
||||
{
|
||||
public class PlayerInfoLayoutBase: ComponentBase
|
||||
{
|
||||
[Inject]
|
||||
public IGraphQlBackendService GraphQlBackendService { get; set; }
|
||||
|
||||
[Inject]
|
||||
public ILocalStorageService LocalStorageService { get; set; }
|
||||
|
||||
[Parameter]
|
||||
public long AccountId { get; set; }
|
||||
|
||||
public RealmType CurrentRealmType { get; set; } = RealmType.Eu;
|
||||
|
||||
public IPlayer_AccountInfo AccountInfo { get; set; }
|
||||
|
||||
protected override async Task OnInitializedAsync()
|
||||
{
|
||||
var settings = await LocalStorageService.ReadSettings();
|
||||
CurrentRealmType = settings.RealmType;
|
||||
|
||||
AccountInfo = await GraphQlBackendService.GetPlayerInfo(AccountId, CurrentRealmType);
|
||||
|
||||
await base.OnInitializedAsync();
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user