You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The project-list component seems to be doing a bit too much, causing some issues with the different ways it's used requiring band-aids.
Let's simplify the API of it, here's my thought:
Project List gets passed in 2 props: projects, which is an array of objects (entries from the API), and sortBy, a key to sort the projects by or a list of IDs by which to order them.
Any other logic in there gets pulled up a level (like the issues bit) so that those higher components handle fetching the data and passing it in to the Project List. This should also allow you to DRY out the search.jsx and project-list.jsx files.
In addition, the CSS could be cleaned up a bit to use bootstrap classes and less custom styles.
The text was updated successfully, but these errors were encountered:
The project-list component seems to be doing a bit too much, causing some issues with the different ways it's used requiring band-aids.
Let's simplify the API of it, here's my thought:
Project List
gets passed in 2 props:projects
, which is an array of objects (entries from the API), andsortBy
, a key to sort the projects by or a list of IDs by which to order them.Any other logic in there gets pulled up a level (like the
issues
bit) so that those higher components handle fetching the data and passing it in to theProject List
. This should also allow you to DRY out thesearch.jsx
andproject-list.jsx
files.In addition, the CSS could be cleaned up a bit to use bootstrap classes and less custom styles.
The text was updated successfully, but these errors were encountered: