Coding task · Vibe coding with Claude Code course · Module 3: Twitter clone

Practice: Pirate card component

The avatar is text, e.g. the initials CR, or an image URL: show it in a div or as the src of an img tag. The test renders the card with different props, so don't hard-code the name.

Task

Write a PirateCard component (export default) with name, role and avatar props of type string. Describe the prop types in a TypeScript interface, e.g. PirateCardProps. The card shows the avatar, the name in an h3 heading and the role in a p paragraph.