As a user, I want to see my saved events when I visit my dashboard.
Acceptance Criteria
GIVEN a user has saved events
WHEN the user visits their dashboard
THEN the events should be presented in the Events component
AND the user should only see events that belong to their uid.
Development
Display the events from firebase seed data
Make a promise to pull down data from firebase eventsData.js file in helpers
In promise, import firebase url
axios.get input firebaseUrl
.then
make empty array
loop through each object that comes back
push each object to the empty array
resolve the array
For displaying events:
events.js
Make new fucntion, getEvents, calling function I made in eventsData
inside it eventsData.getdatabase
.then(resp => eventBuilder(resp)
.catch
use uid to display objects that have the same key/value as user.uid.
Notes
look up:
axios.get
axios.post - used to add new data
axios.patch - use to filter
axios.put
axios.update
axios.delete
User Story
As a user, I want to see my saved events when I visit my dashboard.
Acceptance Criteria
GIVEN a user has saved events WHEN the user visits their dashboard THEN the events should be presented in the Events component AND the user should only see events that belong to their uid.
Development
Display the events from firebase seed data
Make a promise to pull down data from firebase eventsData.js file in helpers In promise, import firebase url axios.get input firebaseUrl .then make empty array loop through each object that comes back push each object to the empty array resolve the array
For displaying events: events.js Make new fucntion, getEvents, calling function I made in eventsData inside it eventsData.getdatabase .then(resp => eventBuilder(resp) .catch use uid to display objects that have the same key/value as user.uid.
Notes
look up: axios.get axios.post - used to add new data axios.patch - use to filter axios.put axios.update axios.delete