When the user press on the component CohortListItem (rendered inside CohortsList), the user should be redirected to the page of that specific cohort.
Todo:
On the CohortListItem.js, add a onClick atribute to the
element. And on click (thought useNavigate imported) navigate to /cohorts/${cohort.id}.
Cohort is the prop received by the component. Access its ID (may be cohortId, so check).
When the user press on the component CohortListItem (rendered inside CohortsList), the user should be redirected to the page of that specific cohort.
Todo:
On the CohortListItem.js, add a element. And on click (thought
onClick
atribute to theuseNavigate
imported) navigate to/cohorts/${cohort.id}
. Cohort is the prop received by the component. Access its ID (may be cohortId, so check).Sounds good to me!