Nelofarzabi / space-travelers-hub

This application is designed to provide space enthusiasts with a hub where they can explore and track various aspects of space travel, including missions, and rockets. Whether you're a seasoned astronaut or just a curious earthling, this app has something for everyone.
https://animated-klepon-97321e.netlify.app/
MIT License
1 stars 0 forks source link

Team3 [1pt] Switch badges for Dragons - Conditional components #87

Open Nelofarzabi opened 1 year ago

Nelofarzabi commented 1 year ago

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

Use the React conditional rendering syntax:

{rocket.reserved && ( 
    // render Cancel Rocket button
)}