import type { NFLPlayer } from "../../utils/types"; import { useMemo } from "react"; export default function PlayerCell({ player }: { player: NFLPlayer | null }) { const injuryStatus = useMemo(() => { if (player && player.injury_status) { if (player.injury_status.toLowerCase() === "ir") { return player.injury_status; } else { return `${player.injury_status[0]}.`; } } }, [player?.injury_status]); if (player && player.full_name) { return (
{/* a player name is data, not a document section — this was an

, and with a full roster per team it produced most of the page's heading elements */}

{player.full_name}

{player?.position} · {player?.team} {injuryStatus && "·"}{" "} {player?.injury_status && ( {injuryStatus} )}

{player.points}

); } }