use fetchWrapper for getUserToValidate.js
This commit is contained in:
@@ -16,7 +16,8 @@ function PendingMembers() {
|
||||
useEffect(() => {
|
||||
const fetchPendingMembers = async () => {
|
||||
setLoading(true);
|
||||
const userIds = await getUserToValidate();
|
||||
const result = await getUserToValidate();
|
||||
const userIds = result.data
|
||||
if (userIds && userIds.length > 0) {
|
||||
const users = await Promise.all(userIds.map((id) => getUserById(id)));
|
||||
setPendingMembers(users.filter(Boolean));
|
||||
|
||||
Reference in New Issue
Block a user