import { Link, Text } from '@chakra-ui/react'; import RouterLink from '@/components/RouterLink'; import type { RichText } from '@/content/types'; type RichParagraphProps = { paragraph: RichText; }; // One paragraph of running text with links in it (BR-OM-03): text pieces as // they are, link pieces as underlined router links. export default function RichParagraph({ paragraph }: RichParagraphProps) { return ( {paragraph.map((piece, index) => typeof piece === 'string' ? ( piece ) : ( // Static content: the order never changes, so the index // is a stable key {piece.text} ), )} ); }