@page "/sys/users"
@using ImageBoardServerApp.Data.Repository
<AuthorizeView Roles="Admin">
    <Authorized>
        <h3>Users</h3>
        @foreach (var u in users)
        {
            <UserEntry user="u"/>
            <hr/>
        }
    </Authorized>
    <NotAuthorized>
        <DeadLink/>
    </NotAuthorized>
</AuthorizeView>
@code {
    private List<UserData> users { get; set; }

    protected override async Task OnInitializedAsync()
    {
        users = await UsersRepository.getUsersAsync();
    }

}