"use client" import * as React from "react" import { tileUrl } from "@/lib/api" import type { Hit } from "@/lib/types" import { cn } from "@/lib/utils" interface TileCardProps { hit: Hit rank: number selected?: boolean onSelect?: (hit: Hit) => void onClick?: (hit: Hit) => void } export function TileCard({ hit, rank, selected, onSelect, onClick }: TileCardProps) { const [imgError, setImgError] = React.useState(false) const [imgLoaded, setImgLoaded] = React.useState(false) return (