astrobench · play with code
Step
6/11

Status check

Some are in orbit, some are Earth-side. Show the right one.

Astronauts have states : in orbit, earth-side, on EVA. The card already knows the difference.

 

You don't need a full if block — JSX-style templates let you drop a ternary right where the text goes: {cond ? a : b} .

 

The preview feeds { name: "Mae", mission: "Endeavour", status: "orbit" } . Tweak the branches — change the labels, swap the emojis.

src/components/Card.astro — now smarter live

One component, two looks. Data decides.

— page 6 —
in the binder open binder →
saved a moment ago
progress 55%
earn +60 XP