@page "/raidoverview"
@using Lieb.Data
@using System.Security.Claims
@using Lieb.Models
@using Lieb.Models.GuildWars2.Raid
@inject RaidService RaidService
@inject UserService UserService
@inject AuthenticationStateProvider AuthenticationStateProvider
RaidOverview
Add Raid
@foreach (var raid in _raids) {
}
@code
{
private List _raids;
private LiebUser? _user;
protected override async Task OnInitializedAsync()
{
var authState = await AuthenticationStateProvider.GetAuthenticationStateAsync();
if (authState.User.Identity.IsAuthenticated)
{
ulong discordId = ulong.Parse(authState.User.Claims.FirstOrDefault(c => c.Type == ClaimTypes.NameIdentifier).Value);
_user = UserService.GetLiebUserSmall(discordId);
}
_raids = RaidService.GetRaids();
}
}