nss-evening-cohort-11 / bands-viking-galaxy

bands-viking-galaxy created by GitHub Classroom
0 stars 1 forks source link

purchase tickets button #11

Closed christopherjohnson1 closed 4 years ago

christopherjohnson1 commented 4 years ago

User Story

As a user, I should click a button to purchase tickets

AC

WHEN I navigate to the tour page THEN I should see the table with all concerts, dates, and venues AND the last column should should have a button in each row that displays Tickets AND when I click the button, a window alert will pop up and say "Congrats! Your tickets have been purchased!"

Dev Notes

John-Fleming commented 4 years ago

Screen Shot 2020-02-10 at 7 00 41 PM

StevenZelenak commented 4 years ago
//function that creates tickets id's (was not in card to create)
const ticketIdCreator = () => {
    for (let i = 0; i < concerts.length; i++) {
        concerts[i].Id = i.toString();
    }
    return concerts;
}

Had to create a function to give all the Buttons their own Id.