use fetchWrapper for users routes
This commit is contained in:
@@ -16,8 +16,8 @@ function VolunteerPage() {
|
||||
|
||||
useEffect(() => {
|
||||
(async () => {
|
||||
const ids = await getAllUser();
|
||||
const usersData = await Promise.all(ids.map(id => getUserById(id)));
|
||||
const result = await getAllUser();
|
||||
const usersData = await Promise.all(result.data.map(id => getUserById(id)));
|
||||
setUsers(usersData);
|
||||
})()
|
||||
}, [])
|
||||
|
||||
Reference in New Issue
Block a user