AuthorLinks
Renders a list of external links associated with an author/person.
Props
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
author | Person & { links?: { link?: Array<{ href: string }>; $?: { link?: CSLPFieldMapping } } } | Yes | - | Person object with optional links array |
cslp | CSLPFieldMapping | No | - | CSLP mapping for the container |
className | string | No | '' | Additional CSS classes |
Usage
import AuthorLinks from '@/components/molecules/AuthorLinks';
<AuthorLinks
author={personData}
className="mt-4"
/>Features
- External link detection: Automatically adds
target="_blank"andrel="noopener noreferrer"for URLs starting withhttp - CSLP support: Supports Live Preview editing on the container and individual links
- Semantic markup: Uses
<nav>witharia-labelfor accessibility
Notes
- Returns
nullif the author has no links - Displays the raw
hrefas the link text - Used on the Author page to show a person's external links (social media, websites, etc.)