Some checks failed
🚀 Deploy / 🧪 Test (pull_request) Successful in 1m37s
🚀 Deploy / ʦ TypeScript (pull_request) Failing after 1m13s
🚀 Deploy / 🔍 Lint (pull_request) Successful in 47s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
bg-card and bg-muted resolve to the same hex value, so swap to bg-white/[0.06] for a visible lift against the sidebar background. Also top-aligns the pick number badge in recent picks items. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
58 lines
1.6 KiB
TypeScript
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-white/[0.06] rounded-lg text-sm"
|
|
>
|
|
<div className="flex items-start 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>
|
|
);
|
|
});
|