@page "/sys/modmenu/reports"
@using ImageBoardServerApp.Data.Repository
<AuthorizeView Roles="Admin,Mod">
    <Authorized>
        <h3>Reports</h3>
        @foreach (var r in reports)
        {
            <ReportEntry report="r"/>
            <hr/>
        }
    </Authorized>
    <NotAuthorized>
        <DeadLink/>
    </NotAuthorized>
</AuthorizeView>


@code {
    private List<ReportData> reports;
    protected override async Task OnInitializedAsync()
    {
        reports = await ReportsRepository.getReportsAsync();
        Console.WriteLine("Opened Reports");
    }
}