boolean-uk / team-dev-frontend-client

1 stars 11 forks source link

Update StudentList logic #213

Closed lucianosimoni closed 1 year ago

lucianosimoni commented 1 year ago

Reason

Because if the teacher presses a cohort item (In the CohortsList component), it would take the teacher to /cohorts/:cohortId.

And the StudentList only renders the url /cohorts/:cohortId based on the user prop that it receives. And the Teacher does not have a user.cohortId, cause the button was pressed (So the url is dynamic).

Solution

Inside the useEffect. add the following condition to the first client.get:

Todo

Wait for issue #120 to be merged, then update respectively - Look at lest todo

OlhaDorofiychuk commented 1 year ago

sounds good

dogezen commented 1 year ago

good one