1
0
mirror of synced 2025-02-20 04:31:24 +01:00

Add handling for no scores

This commit is contained in:
shiibe 2022-09-10 20:12:56 -04:00
parent 87e61bd77c
commit 809a2d72f6

View File

@ -33,7 +33,8 @@
{
<MudTabPanel Text="@GetDifficultyTitle(difficulty)"
Icon="@GetDifficultyIcon(difficulty)">
@if (@response.SongBestData.Where(data => data.Difficulty == difficulty).Count() > 0)
{
<MudDataGrid Items="@response.SongBestData.Where(data => data.Difficulty == difficulty)"
ColumnResizeMode="ResizeMode.Container" RowsPerPage="25" Elevation="0">
<Columns>
@ -98,6 +99,15 @@
<MudDataGridPager T="SongBestData"/>
</PagerContent>
</MudDataGrid>
} else {
<MudGrid>
<MudItem xs="12">
<MudText Align="Align.Center" Class="my-8">
No data for selected difficulty.
</MudText>
</MudItem>
</MudGrid>
}
</MudTabPanel>
}