Added first implementation of subscriptions
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
@using Moonlight.App.Services.Sessions
|
||||
@using Moonlight.App.Database.Entities
|
||||
|
||||
@inject IdentityService IdentityService
|
||||
|
||||
@if (User != null)
|
||||
{
|
||||
if (User.Admin)
|
||||
@@ -22,15 +20,6 @@
|
||||
[Parameter]
|
||||
public RenderFragment ChildContent { get; set; }
|
||||
|
||||
private User? User;
|
||||
|
||||
protected override async Task OnAfterRenderAsync(bool firstRender)
|
||||
{
|
||||
if (firstRender)
|
||||
{
|
||||
User = await IdentityService.Get();
|
||||
|
||||
await InvokeAsync(StateHasChanged);
|
||||
}
|
||||
}
|
||||
[CascadingParameter]
|
||||
public User? User { get; set; }
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user