- Add TeamNameDisplay component that renders team name (as link) with owner username below, matching the league homepage style - Update StandingsTable to use TeamNameDisplay with owner username shown below team name - Update league homepage standings section to use TeamNameDisplay - Add ownerName/teamOwnerId fields to TeamStanding type - Extend getSeasonStandings to include teamOwnerId from team relation - Fetch and attach owner display names in the full standings page loader https://claude.ai/code/session_01EYgGnuTBaRVdBDapJRTxDZ
31 lines
785 B
TypeScript
31 lines
785 B
TypeScript
import { Link } from "react-router";
|
|
|
|
interface TeamNameDisplayProps {
|
|
teamName: string;
|
|
ownerName?: string | null;
|
|
href?: string;
|
|
}
|
|
|
|
/**
|
|
* Displays a team name with optional owner username below it.
|
|
* If href is provided, the team name is rendered as a link.
|
|
*/
|
|
export function TeamNameDisplay({ teamName, ownerName, href }: TeamNameDisplayProps) {
|
|
return (
|
|
<div className="min-w-0">
|
|
{href ? (
|
|
<Link
|
|
to={href}
|
|
className="font-medium text-sm hover:underline truncate block"
|
|
>
|
|
{teamName}
|
|
</Link>
|
|
) : (
|
|
<p className="font-medium text-sm truncate">{teamName}</p>
|
|
)}
|
|
{ownerName && (
|
|
<p className="text-xs text-muted-foreground truncate">{ownerName}</p>
|
|
)}
|
|
</div>
|
|
);
|
|
}
|