As a user, I should be able to delete all of the rides from the page and still be able to see the Title of the page and the button to add new rides.
AC
WHEN the user deletes all of the rides
THEN they should still see the title of the page and the Build A Ride button.
Dev Notes
Go into the ridesData.js and edit the getRides function to include an if/else statement.
The statement should return the rides as per usual as long as their are rides to return, but if there are not any rides in the database, it should still print the Title and Build A Ride button AND a message stating there are no rides.
After the changes are made to the data file, you will need to call the function again in the printRides function in the Rides component, so it knows to also print the There are no rides message.
User Story
As a user, I should be able to delete all of the rides from the page and still be able to see the Title of the page and the button to add new rides.
AC
WHEN the user deletes all of the rides THEN they should still see the title of the page and the
Build A Ride
button.Dev Notes
Go into the
ridesData.js
and edit the getRides function to include an if/else statement.Build A Ride
button AND a message stating there are no rides.After the changes are made to the data file, you will need to call the function again in the printRides function in the
Rides
component, so it knows to also print theThere are no rides
message.