Files
AndreaSlopFotografie/web/src/components/about/RichParagraph/RichParagraph.tsx
T
SluijsensandClaude Opus 5.5 e15215393e Adds the Over mij page
Replaces the placeholder with the page from the design and the texts from
the live site: Andrea's introduction with her portrait, how it started,
two photos, life outside photography and a booking button. The page is
now indexed, with its own title, description, preview image and AboutPage
data about Andrea.

The portrait loads straight away instead of after the page, since on
phones it is the largest paint. Lighthouse no longer lets every indexed
page use the homepage's lower mobile performance target; it now only
applies to the homepage itself.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-23 01:17:33 +02:00

30 lines
994 B
TypeScript

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 (
<Text>
{paragraph.map((piece, index) =>
typeof piece === 'string' ? (
piece
) : (
// Static content: the order never changes, so the index
// is a stable key
<Link key={index} variant="underline" asChild>
<RouterLink to={piece.to} hash={piece.hash}>
{piece.text}
</RouterLink>
</Link>
),
)}
</Text>
);
}