1
0
mirror of synced 2025-01-19 00:04:05 +01:00

Clean up var

This commit is contained in:
shiibe 2024-06-06 00:18:49 -04:00
parent 9644df19f4
commit dc8916fea8
2 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@
@if (isLoading || response == null)
{
// Loading...
for (uint i = 0; i < currentPageSize; i++) {
for (uint i = 0; i < pageSize; i++) {
<MudItem xs="12" md="6" lg="4" xl="3">
<MudCard Outlined="true">
<MudCardContent>

View File

@ -7,13 +7,13 @@ public partial class Users
private int TotalPages { get; set; } = 0;
private bool isLoading = true;
private int currentPage = 1;
private int currentPageSize = 12;
private readonly int pageSize = 12;
private string? searchTerm = null;
private async Task GetUsersData()
{
isLoading = true;
response = await Client.GetFromJsonAsync<UsersResponse>($"api/Users?page={currentPage}&limit={currentPageSize}&searchTerm={searchTerm}");
response = await Client.GetFromJsonAsync<UsersResponse>($"api/Users?page={currentPage}&limit={pageSize}&searchTerm={searchTerm}");
response.ThrowIfNull();
TotalPages = response.TotalPages;