brackt/app/components/draft/SidebarRecentPicks.tsx
Chris Parsons 172302cad6
Some checks failed
🚀 Deploy / 🧪 Test (pull_request) Successful in 1m36s
🚀 Deploy / ʦ TypeScript (pull_request) Failing after 1m16s
🚀 Deploy / 🔍 Lint (pull_request) Successful in 48s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
Fix snake draft Discord pick numbering and small UX tweaks
- Discord pick notifications now show the sequential pick-in-round
  (e.g. "Round 2, Pick 9") rather than the snake-adjusted slot position
  ("Round 2, Pick 5") — fixes confusing numbers on even rounds
- Remove unused pickInRound param from notifyPickMadeOnDiscord; add
  regression test for the 13-team snake draft case
- League name in draft-in-progress card is now a link to the league
  homepage alongside the existing Enter Draft button
- Overnight pause cell label shortened to "🌙 Pause" (resumesAt line
  below it already provides the time context)
- Queue and recent picks items use bg-card instead of bg-muted for
  better visual separation from the panel background

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-21 21:01:05 -07:00

58 lines
1.6 KiB
TypeScript

import { memo } from "react";
import { Badge } from "~/components/ui/badge";
interface SidebarRecentPicksProps {
picks: Array<{
id: string;
pickNumber: number;
round: number;
participant: {
name: string;
};
sport: {
name: string;
};
team: {
name: string;
};
}>;
}
export const SidebarRecentPicks = memo(function SidebarRecentPicks({ picks }: SidebarRecentPicksProps) {
return (
<div className="p-4">
{picks.length === 0 ? (
<p className="text-muted-foreground text-sm text-center py-8">
No picks yet...
</p>
) : (
<div className="space-y-1.5">
{picks
.slice()
.toReversed()
.map((pick) => (
<div
key={pick.id}
className="flex items-center justify-between p-2 bg-card rounded-lg text-sm"
>
<div className="flex items-center gap-2 min-w-0 flex-1">
<Badge variant="outline" className="text-xs flex-shrink-0">
#{pick.pickNumber}
</Badge>
<div className="min-w-0 flex-1">
<p className="font-semibold truncate">{pick.participant.name}</p>
<p className="text-xs text-muted-foreground truncate">
{pick.sport.name}
</p>
<p className="text-xs text-muted-foreground truncate">
{pick.team.name}
</p>
</div>
</div>
</div>
))}
</div>
)}
</div>
);
});