diff --git a/src/App.tsx b/src/App.tsx index 30bccd2..1308770 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -27,11 +27,11 @@ function App() { - + diff --git a/src/components/Profile.tsx b/src/components/Profile.tsx index 54ad93f..b9c7dee 100644 --- a/src/components/Profile.tsx +++ b/src/components/Profile.tsx @@ -20,7 +20,7 @@ const useStyles = makeStyles({ const Profile = () => { const { user } = useContext(AuthenticationContext); - // const [groups, setGroups] = useState([]); + const [groups, setGroups] = useState([]); const [pools, setPools] = useState([]); const classes = useStyles(); @@ -28,6 +28,10 @@ const Profile = () => { makeAPIGetCall('/users/@me/pools').then((res) => { if (res.data.data) setPools(res.data.data); }); + + makeAPIGetCall('/users/@me/groups').then((res) => { + if (res.data.data) setGroups(res.data.data); + }); }, []); if (!user) { @@ -47,9 +51,9 @@ const Profile = () => { - {user.username}'s Pools + My Pools (private) - + {pools.map((pool) => { return ( { ); })} + + + My Groups (private) + + {groups.map((group) => { + return ( + + + {group.name} + + + ); + })} + + );