Pass them around
Mission Control sends many astronauts. Make the card take a name.
Mission Control sends many astronauts. We can't hardcode every name inside the card — it'd defeat the point of having a component.
Time for props . The card pulls name and mission from Astro.props — any page can pass different values in as HTML attributes.
The preview feeds name="Mae" mission="Endeavour" into your Card. Try changing the heading or destructuring an extra prop.
And on the page that uses it — pass the values like attributes:
---
import Card from "~/components/Card.astro";
---
<Card name="Mae" mission="Endeavour" />
<Card name="Ovidiu" mission="Apollo 42" />
<Card name="Sergei" mission="Soyuz 11" /> Three cards. One component. That's the whole trick.