🔧 fix(AdminPage/index.tsx): fix incorrect assignment of users and total count in getUsersPage response
🔧 fix(AdminPage/index.tsx): fix incorrect assignment of filtered user list in getUsersPage response 🔧 fix(AdminPage/index.tsx): fix incorrect assignment of total rows count in getUsersPage response
This commit is contained in:
parent
e124b216d7
commit
b96fcfb06c
1 changed files with 4 additions and 2 deletions
|
|
@ -33,6 +33,7 @@ export default function AdminPage() {
|
|||
const [loadingUsers, setLoadingUsers] = useState(true);
|
||||
const { setErrorData, setSuccessData } = useContext(alertContext);
|
||||
const { userData } = useContext(AuthContext);
|
||||
const [totalRowsCount, setTotalRowsCount] = useState(0);
|
||||
|
||||
const userList = useRef([]);
|
||||
|
||||
|
|
@ -48,8 +49,9 @@ export default function AdminPage() {
|
|||
setLoadingUsers(true);
|
||||
getUsersPage(index, size)
|
||||
.then((users) => {
|
||||
userList.current = users;
|
||||
setFilterUserList(users);
|
||||
setTotalRowsCount(users['total_count']);
|
||||
userList.current = users['users'];
|
||||
setFilterUserList(users['users']);
|
||||
setLoadingUsers(false);
|
||||
})
|
||||
.catch((error) => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue