/* ═══════════════════════════════════════════════════════════════ ORG CONTACT An organization's ways to reach it, as buttons: its action links filled in its accent, then its website, email and socials outlined. Nothing at all when it has none. Used on an organization's page and on the Organization page (NGU's own). A platform's icon has its name beside it for screen readers and reading mode, unless the label already says it (PlatformName). ═══════════════════════════════════════════════════════════════ */ import PlatformIcon from './PlatformIcon.tsx' import type { OrganizationRecord } from '../lib/useContent.ts' import { accentText } from '../lib/color.ts' import { PLATFORMS } from '../lib/platforms.ts' function PlatformName({ platform, label }: { platform?: string | null; label?: string | null }) { const name = PLATFORMS.find((p) => p.id === platform)?.label if (!name || label?.toLowerCase().includes(name.toLowerCase())) return null return {label ? `${name}: ` : name} } export default function OrgContact({ org, accent }: { org: OrganizationRecord; accent: string }) { const hasAny = org.links.length > 0 || org.socials.length > 0 || org.website || org.email if (!hasAny) return null return (