use fetchWrapper for getUserToValidate.js

This commit is contained in:
T'JAMPENS QUENTIN p2406187
2026-01-30 14:41:25 +01:00
parent c11bb849c5
commit c43b411bac
2 changed files with 6 additions and 21 deletions
@@ -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));