VitorGuedesMadeira / Space-Traveler

This project is a web application that consumes an SpaceX API. It provides commercial and scientific space travel services that allows users to book rockets and join selected space missions. Built with React/Redux (Redux ToolKit)
12 stars 1 forks source link

[1pt] Switch badges for Missions - Conditional components #27

Open VitorGuedesMadeira opened 2 years ago

VitorGuedesMadeira commented 2 years 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
)}