Closed stephencastaneda closed 4 years ago
As a user, when I click on a look at the single view page for a song, I should the resources associated with that song.
WHEN I click on the single view button THEN I open up a single view page AND I should see all the resources associated with that song
state
resources
{}
singleSong
getResources
resourcesData.js
componentDidMount()
songId
.then
response
this.setState
response.data
.catch
*render() should get { resources } from this.state
render()
{ resources }
this.state
resources.resourceName
typeId.icon
resources.url
User Story
As a user, when I click on a look at the single view page for a song, I should the resources associated with that song.
AC
WHEN I click on the single view button THEN I open up a single view page AND I should see all the resources associated with that song
Dev Notes
state
setresources
to an empty object{}
singleSong
page create agetResources
function fromresourcesData.js
in thecomponentDidMount()
songId
.then
should get aresponse
and setthis.setState
of theresources
toresponse.data
.catch
should console unable to get resources*
render()
should get{ resources }
fromthis.state
resources.resourceName
typeId.icon
andresources.url