From c3df875f1aedbd17040da47d1a905ca853cc3611 Mon Sep 17 00:00:00 2001 From: anovazzi1 Date: Mon, 25 Sep 2023 18:07:06 -0300 Subject: [PATCH] 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. --- src/frontend/src/pages/AdminPage/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/frontend/src/pages/AdminPage/index.tsx b/src/frontend/src/pages/AdminPage/index.tsx index 24baefb5b..f6e17a32a 100644 --- a/src/frontend/src/pages/AdminPage/index.tsx +++ b/src/frontend/src/pages/AdminPage/index.tsx @@ -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"];