Zuhaib042 / Space-Travelers-Hub

Space Travelers Hub is an SPA app to view and read about the SpaceX latest rockets and missions form SpaceX API. You can reserve rockets and join their missions. We built this app with React and we used Redux as a state management library. For testing we used react-testing-library with Jest.
MIT License
4 stars 0 forks source link

[1pt] Switch badges for Rockets - Conditional components #5

Open Zuhaib042 opened 1 year ago

Zuhaib042 commented 1 year ago

Rockets that have already been reserved should show a "Reserved" badge and "Cancel reservation" button instead of the default "Reserve rocket" (as per design)

Use the React conditional rendering syntax:

{rocket.reserved && ( 
    // render Cancel Rocket button
)}
Zuhaib042 commented 1 year ago

Hello @DJ-MrJay kindly have a look at this PR for review. https://github.com/Zuhaib042/Space-Travelers-Hub/pull/33