import { publicReference } from '@/lib/public-presentation'; export default function PublicReference({ value }: { value?: string | null }) { const text = publicReference(value); if (!text) return null; if (/^https?:\/\//i.test(text)) return ( Consultar fonte — {new URL(text).hostname} ); return <>{text}; }