Closed stephencastaneda closed 4 years ago
As a user, when the set page loads, I should see all of the sets created.
WHEN I click on the set page THEN the set page loads AND I should see all the sets created
in SetSongs.js create an empty array in state called setSongs
SetSongs.js
setSongs
create a getSetSongs function
getSetSongs
.then should reset this.setState to the new setSongs object
.then
this.setState
.catch should console.error unable to get sets on failure
.catch
call the componentDidMount() and mountthis.getSetSongs` function
componentDidMount() and mount
render() should get { setSongs } from this.state
render()
{ setSongs }
this.state
Next, it should use buildSet function to do a map over all the setSongs
buildSet
The setSongs should be created in a setSongCard component and pass the component the key and the setSongs
setSongCard
key
it should return a div with the className of set
set
it should include an h1 that says sets *The { builtSet } function should be wrapped in a div with the d-flex and flex-wrap classes
sets
{ builtSet }
d-flex
flex-wrap
User Story
As a user, when the set page loads, I should see all of the sets created.
AC
WHEN I click on the set page THEN the set page loads AND I should see all the sets created
Dev Notes
in
SetSongs.js
create an empty array in state calledsetSongs
create a
getSetSongs
function.then
should resetthis.setState
to the newsetSongs
object.catch
should console.error unable to get sets on failurecall the
componentDidMount() and mount
this.getSetSongs` functionrender()
should get{ setSongs }
fromthis.state
Next, it should use
buildSet
function to do a map over all thesetSongs
The setSongs should be created in a
setSongCard
component and pass the component thekey
and thesetSongs
it should return a div with the className of
set
it should include an h1 that says
sets
*The{ builtSet }
function should be wrapped in a div with thed-flex
andflex-wrap
classes