/* ═══════════════════════════════════════════════════════════════ LOGO An for a logo or mark that may not exist: no src, or a file that 404s, and it draws `fallback` instead (initials, a color dot, or nothing). `src` is already resolved (mediaUrl in media.ts). An upload loads its 640px copy first (useSmallImage). Decorative by default (alt ""), since a logo sits next to the name it stands for. ═══════════════════════════════════════════════════════════════ */ import type { ReactNode } from 'react' import { useSmallImage } from '../lib/useSmallImage.ts' export default function Logo({ src, alt = '', className, fallback = null, }: { src?: string | null alt?: string className?: string fallback?: ReactNode }) { const img = useSmallImage(src) if (img.failed) return <>{fallback} // logo-plate: a light backing in dark mode, for marks drawn for white. return {alt} }