As a user, when I am logged in and the page loads, I should see all the boards that belong to me.(instruction from Zoe)
AC
WHEN the page loads
THEN Boards should display on the page
AND they should only be ones that belong to the user logged in
Dev Notes
[ ] create a file in data called boardData.js
[ ] inside that file, create a function getUserBoards that creates a new Promise. Use axios "get" to access the firebase data, find the uid for user, and loops through the object keys of userBoards.json. Each one that has a uid that matches the logged in user's uid, pushed each board id into an empty array, which is then used to resolve the promise.
[ ] inside the file boards.js, create a function called boardBuilder that calls getUserBoards, loops over the resolved array of boards from that function, builds a domString card for each of them, and prints them into the <div> with id="boards-container"
User Story
As a user, when I am logged in and the page loads, I should see all the boards that belong to me.(instruction from Zoe)
AC
WHEN the page loads THEN Boards should display on the page AND they should only be ones that belong to the user logged in
Dev Notes
data
calledboardData.js
getUserBoards
that creates a new Promise. Use axios "get" to access the firebase data, find the uid for user, and loops through the object keys ofuserBoards.json
. Each one that has auid
that matches the logged in user'suid
, pushed each boardid
into an empty array, which is then used to resolve the promise.boards.js
, create a function calledboardBuilder
that callsgetUserBoards
, loops over the resolved array of boards from that function, builds adomString
card for each of them, and prints them into the<div>
withid="boards-container"