use fetchWrapper for users routes

This commit is contained in:
T'JAMPENS QUENTIN p2406187
2026-01-30 14:35:07 +01:00
parent a0bba2deb4
commit 79e765dd96
5 changed files with 26 additions and 102 deletions
+2 -2
View File
@@ -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);
})()
}, [])