boolean-uk / team-dev-frontend-client

1 stars 11 forks source link

Check if we have students to display #208

Open lucianosimoni opened 1 year ago

lucianosimoni commented 1 year ago

Before mapping and displaying result of studentsList function, add condition that checks if we have students to display. if yes, proceed with the return in function, otherwise display 'no students found'

Code should look like this approx:

{mapOfCohort !== 0 || mapOfStudents !== 0 ? (
          asStudent === true ? (
            mapOfCohort
          ) : (
            mapOfStudents
          )
        ) : (
          <span>No Students Found</span>
        )}
dogezen commented 1 year ago

Not sure whic COMPONENT this code needs to be in...

OlhaDorofiychuk commented 1 year ago

StudentsList