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:
anovazzi1 2023-09-25 18:07:06 -03:00
commit c3df875f1a

View file

@ -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"];