+
{pools.map((pool, index) => {
let background;
diff --git a/src/components/Pool.tsx b/src/components/Pool.tsx
index 58644b8..330365c 100644
--- a/src/components/Pool.tsx
+++ b/src/components/Pool.tsx
@@ -86,7 +86,7 @@ export default function Pool() {
}
});
}
- }, [user]);
+ }, [user, id, pool]);
useEffect(() => {
fetch(`${process.env.REACT_APP_API_ENDPOINT}/pool/${id}`)
diff --git a/src/components/Profile.tsx b/src/components/Profile.tsx
index 387624b..0bbc4b7 100644
--- a/src/components/Profile.tsx
+++ b/src/components/Profile.tsx
@@ -19,60 +19,9 @@ const useStyles = makeStyles({
});
const Profile = () => {
- const { user, isLoggedIn } = useContext(AuthenticationContext);
- const [groups, setGroups] = useState([]);
- const [pools, setPools] = useState([
- /*
- {
- id: 1,
- pool_title: 'TJ Carpool',
- pool_text: 'Carpool from TJ track to homes',
- start_time: '4/10/2021 3:00 PM',
- end_time: '4/10/2021 4:00 PM',
- capacity: 2,
- participants: [],
- comments: [
- 'What is the covid vaccination status of all the participants?',
- ],
- },
- {
- id: 2,
- pool_title: 'TJ Carpool',
- pool_text: 'Carpool from TJ track to homes',
- start_time: '4/10/2021 3:00 PM',
- end_time: '4/10/2021 4:00 PM',
- capacity: 2,
- participants: [],
- comments: [
- 'What is the covid vaccination status of all the participants?',
- ],
- },
- {
- id: 3,
- pool_title: 'TJ Carpool',
- pool_text: 'Carpool from TJ track to homes',
- start_time: '4/10/2021 3:00 PM',
- end_time: '4/10/2021 4:00 PM',
- capacity: 2,
- participants: [],
- comments: [
- 'What is the covid vaccination status of all the participants?',
- ],
- },
- {
- id: 4,
- pool_title: 'TJ Carpool',
- pool_text: 'Carpool from TJ track to homes',
- start_time: '4/10/2021 3:00 PM',
- end_time: '4/10/2021 4:00 PM',
- capacity: 2,
- participants: [],
- comments: [
- 'What is the covid vaccination status of all the participants?',
- ],
- },
- */
- ]);
+ const { user } = useContext(AuthenticationContext);
+ // const [groups, setGroups] = useState([]);
+ const [pools, setPools] = useState([]);
const classes = useStyles();
useEffect(() => {