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 Missions - Conditional components #6

Open Zuhaib042 opened 1 year ago

Zuhaib042 commented 1 year ago

Missions that the user has joined already should show a badge "Active Member" instead of the default "NOT A MEMBER" and a button "Leave Mission" instead of the "Join Mission" button (as per design).

Use the React conditional rendering syntax:

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