The component CohortAddPopup (see issue #115) has been created, but component CohortList (see issue #113) is not updating the list of cohorts after the add is being done on the CohortAddPopup
What must be done
CohortsList has a state called cohortsResponse. The cohorts is being render there. It must be updated by a function
Create a function in CohortsList that gets the Cohorts from the DB (Same as the one inside useEffect()) and updates the cohortsResponse state.
That function must be passed down to the component CohortAddPopup
Inside CohortAddPopup: after the new data is posted to the DB, on the .then: call the new function passed down which will re-render the cohort list on CohortsList
The component CohortAddPopup (see issue #115) has been created, but component CohortList (see issue #113) is not updating the list of cohorts after the add is being done on the CohortAddPopup
What must be done
cohortsResponse
. The cohorts is being render there. It must be updated by a functioncohortsResponse
state.posted
to the DB, on the .then: call the new function passed down which will re-render the cohort list on CohortsList