use fetchWrapper for users routes

This commit is contained in:
T'JAMPENS QUENTIN p2406187 committed 2026-01-30 14:35:07 +01:00
1 parent a0bba2deb4
commit 79e765dd96
5 files changed
+26 -102

No files matched your search

+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);
})()
}, [])