/**
 * The source's icon, shown beside its name.
 *
 * Renders nothing when there is no icon. A source we do not track has no
 * company row and therefore no logo, and an empty square or a generic
 * placeholder next to every such story would be noise pretending to be
 * information — the name alone reads better.
 *
 * A plain <img>, not next/image: these are ~500-byte SVGs served from our
 * own /public, so the optimiser would add a round trip and a cache entry
 * to save nothing. `aria-hidden` because the source name always sits
 * beside it — announcing the logo too would just repeat the name.
 */
export function SourceIcon({
  src,
  size = 16,
}: {
  src: string | null | undefined;
  size?: number;
}) {
  if (!src) return null;

  return (
    <img
      src={src}
      alt=""
      aria-hidden="true"
      width={size}
      height={size}
      loading="lazy"
      decoding="async"
      className="source-icon"
      style={{ width: size, height: size }}
    />
  );
}
