Closed stephencastaneda closed 4 years ago
As a user, when the set page loads, I see all the Set titles with dates.
WHEN I click on the set page THEN the set page loads AND I should see cards AND cards should have a set title and date
part 1
in Sets.js create an in create an empty array in state called sets. create a getSets function
Sets.js
sets
getSets
.then
this.setState
this.getSets
part 2
{ sets }
this.state
buildSetList
setSongCard
key
set
Sets
{buildSet}
d-flex
flex-wrap
IN SET DATA FILE *create getAllSets function
getAllSets
User Story
As a user, when the set page loads, I see all the Set titles with dates.
AC
WHEN I click on the set page THEN the set page loads AND I should see cards AND cards should have a set title and date
Dev Notes
part 1
in
Sets.js
create an in create an empty array in state calledsets
. create agetSets
function.then
should resetthis.setState
to the new sets object *.catch should conole.error unable to get sets on failurethis.getSets
functionpart 2
{ sets }
fromthis.state
buildSetList
function to do a map over all thesets
setSongCard
component and pass the component thekey
and theset
*It should return a div with the className ofSets
sets
*The{buildSet}
function should be wrapped in a div with thed-flex
andflex-wrap
classesIN SET DATA FILE *create
getAllSets
function