As a user, when the songs page loads, I should see all the songs.
AC
WHEN looking at the songs page
THEN I should see a list of all the songs
Dev Notes
STEP 1
in Songs.js create an empty array in state called songs.
create a getSongs function
getSongs should store the uid in a variable called uid and should get the uid by the getUid function crated in authData
getSongs should next call the getAllSongs functino from the SongsData file
.then should reset this.setState to the new songs object
.catch should conole.error unable to get songs on failure
call the componentDidMount() and mount this.getScats function
STEP 2
render() should get { songs } from this.state
Next, it should use buildSongList function to do a map over all the songs
The songs should be created in a songList component and pass the component the key and the song
It should return a div with the className of Songs
It should include an h1 that says songs
The {buildSongList} function should be wrapped in a div with the d-flex and flex-wrap classes
User Story
As a user, when the songs page loads, I should see all the songs.
AC
WHEN looking at the songs page THEN I should see a list of all the songs
Dev Notes
STEP 1
Songs.js
create an empty array in state called songs.getSongs
functiongetSongs
should store the uid in a variable calleduid
and should get the uid by thegetUid
function crated inauthData
getSongs
should next call thegetAllSongs
functino from theSongsData
file.then
should resetthis.setState
to the newsongs
object.catch
shouldconole.error
unable to get songs on failurecomponentDidMount()
and mountthis.getScats
functionSTEP 2
render()
should get{ songs }
fromthis.state
buildSongList
function to do a map over all the songssongList
component and pass the component thekey
and thesong
div
with theclassName
of Songsh1
that sayssongs
{buildSongList}
function should be wrapped in adiv
with thed-flex
andflex-wrap
classesIN SONGS DATA FILE *create
getAllSongs
function