Closed ygitore closed 4 years ago
Shows page mockup
Axios url isn’t quite right. Also looks like you should change the name of that. Maybe to something like this:
const updatedShows= (showsId, updatedShowsId) => axios.put(`${baseUrl}/shows/${showsId}.json`, updatedShowsId);
User Story
As a user, when i should be able to update souvenirs i want and when hover over each accordion items I should see update button.
AC
When update button is clicked, Then bootstrap modal popup with corresponding data from firebase database populate in the fields( Id, Name, date, ticketPrice, location, ImageUrl, description) and save changes button And when save changes button is clicked, update should be made both in firebase database and dom
Dev Notes
updateShowsData.js
file and import axios andapiKeys.json file
.const baseUrl = apiKeys.firebaseKeys.databaseURL;
updateShows
function that takes showsId as parameterupdateShowsData.js
file createupdatedShows
function. asupdateShows
updateShows
intheShows.js
filefinalShowsUpdate
function insidetheShows.js
file that takesshowsId
as parameter for updatefinalShowsUpdate
function callbuildShows
function to display update on dom