boolean-uk / team-dev-frontend-client

1 stars 11 forks source link

Create component - Add Student Popup #120

Closed OlhaDorofiychuk closed 1 year ago

OlhaDorofiychuk commented 1 year ago

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 :

{
        "id":11,
        "cohortId":null,
        "role":"STUDENT",
        "firstName":"Test",
        "lastName":"Test",
        "email":"notmyrealemail@email.com",
        "biography":null,
        "githubUrl":null,
        "profileUrl":"https://images.unsplash.com/photo-1542652735873-fb2825bac6e2?ixlib=rb-1.2.1&ixid=MnwxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8&auto=format&fit=crop&w=774&q=80"
    },

Image

Auenc commented 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.

chris2733 commented 1 year ago

Also if you are already showing which parts of the popup mockup are using which html element (

) you should list what the other parts are using too, like ul, li etc for consistency