From cc2b32d9a0fd003b4c4368ba1466a31917bf5380 Mon Sep 17 00:00:00 2001 From: iyanfdezz Date: Tue, 16 Apr 2024 23:22:11 +0200 Subject: [PATCH] Finx de groupDetails --- webapp/src/pages/Social/GroupDetails.js | 2 +- webapp/src/pages/Social/GroupDetails.test.js | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/webapp/src/pages/Social/GroupDetails.js b/webapp/src/pages/Social/GroupDetails.js index eedf0e83..3f7a33a7 100644 --- a/webapp/src/pages/Social/GroupDetails.js +++ b/webapp/src/pages/Social/GroupDetails.js @@ -47,7 +47,7 @@ const GroupDetails = () => { throw new Error("Network response was not ok"); } const data = await response.json(); - setGroup(data); + setGroup(data.group); setError(null); } catch (error) { setError(error); diff --git a/webapp/src/pages/Social/GroupDetails.test.js b/webapp/src/pages/Social/GroupDetails.test.js index ea5fddab..046470fa 100644 --- a/webapp/src/pages/Social/GroupDetails.test.js +++ b/webapp/src/pages/Social/GroupDetails.test.js @@ -29,9 +29,11 @@ afterEach(() => { }); const groupData = { + group : { name: 'exampleGroup', members: ['user1', 'user2'], createdAt: '2024-04-11T12:00:00Z', + } }; const mockNavigate = jest.fn();