import { Link } from 'react-router'; import type { SitePhoto } from '../lib/types'; import { PlayerAvatar } from './PlayerAvatar'; import { num, relativeTime } from '../lib/format'; // Single-photo tile for the masonry feed. The outer block is a Link // to the photo-detail route; the avatar inside is its OWN Link to the // uploader profile — the inner Link wins click-precedence because // React Router stops event propagation. event.stopPropagation on the // inner anchor preserves that even on touch devices where iOS // occasionally fires both handlers. export function PhotoCard({ photo }: { photo: SitePhoto }) { const tagged = photo.taggedPlayers ?? []; return (
{photo.caption}
)} {tagged.length > 0 && (