Clean up var
This commit is contained in:
parent
9644df19f4
commit
dc8916fea8
@ -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>
|
||||
|
@ -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;
|
||||
|
Loading…
x
Reference in New Issue
Block a user