Closed OlhaDorofiychuk closed 1 year ago
Send fetch('http://localhost:4000/users' )
We don't use fetch
in the codebase, as we have the utils/client.js
file that we use to make requests. It would be a good idea to update the issue to reflect this, so when someone comes to do the work they know what code to use.
It would be nice if you formatted the snippet.
Also if you are already showing which parts of the popup mockup are using which html element (
Create {AddStudentToCohortPopUp} component.
It needs to have the absolute position, and have full width and height, with a background with a small amount of opacity to give the effect of a PopUp
Requirements:
Students and setStudents should be passed as Props.
import client from './utils/client'. let response = client.get('/users') and render filtered response to include only students with no cohort assigned.
example of response with student without cohort :
Select student and add this student to the cohort we are in onClick. Add PATCH reques to the client as well. OnClick send PATCH request via client and update students state with added cohort ID ('http://localhost:4000/users/id' )
This only renders for teachers