fix(AdminPage/index.tsx): fix off-by-one error in getUsersPage function call to correctly pass the index parameter
The getUsersPage function was being called with the incorrect index parameter. It was off by one, causing the wrong page of users to be fetched. This has been fixed by subtracting 1 from the index parameter before calling the function.
This commit is contained in:
parent
f497369a1c
commit
c3df875f1a
1 changed files with 1 additions and 1 deletions
|
|
@ -63,7 +63,7 @@ export default function AdminPage() {
|
|||
|
||||
function getUsers() {
|
||||
setLoadingUsers(true);
|
||||
getUsersPage(index, size)
|
||||
getUsersPage(index - 1, size)
|
||||
.then((users) => {
|
||||
setTotalRowsCount(users["total_count"]);
|
||||
userList.current = users["users"];
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue