As a user, if I am not logged in, when I open the excursions page I should see cards of all the recent excursions the nautilus has been on.
AC:
WHEN the page loads,
AND I am logged out,
THEN excursions will appear in card format. I should be able to click on an excursion and read about it.
Dev Notes:
Use bootstrap cards for excursions. The name, image, brief synopsis and destination of the excursion should appear on the card when the user is logged out. Info should be pulled from firebase to fill the card.
create an excursionsData file with a getExcursionsData() function to convert firebase objects. Export getExcursionsData().
create an excursionCards.js module with an excursionCards()
function. This function should contain an if/else statement checking if the user is logged in. The if statement checks if the user is logged in. If so, the domstring should include an edit button (yellow) and a delete button (red). In the else statement the buttons are left out.
const userSignedIn = firebase.auth().currentUser;
if (userSignedIn) {
bootstrap card elements with edit and delete buttons included here
} else {
no edit and delete buttons included
}
create a printExcursionCards() function in the excursions.js module that calls excursionCards(), getExcursionsData() and prints them to the DOM. Export printExcursionCards() and call printExcursionCards() in the authData.js file.
User Story:
As a user, if I am not logged in, when I open the excursions page I should see cards of all the recent excursions the nautilus has been on.
AC:
WHEN the page loads, AND I am logged out, THEN excursions will appear in card format. I should be able to click on an excursion and read about it.
Dev Notes:
const userSignedIn = firebase.auth().currentUser; if (userSignedIn) { bootstrap card elements with edit and delete buttons included here } else { no edit and delete buttons included }
const printExcursionCards = () => { excursionsData.getExcursionsData() .then((excursions) => { let domString = ' '; domString = '
Excursions
'; domString += '