Compare commits

..

1 commit

Author SHA1 Message Date
Chris Parsons
3f9c1d99e2 Fix invite link showing http and show draft board card during live draft
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 1m25s
🚀 Deploy / ʦ TypeScript (pull_request) Successful in 1m14s
🚀 Deploy / 🔍 Lint (pull_request) Successful in 48s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
- Use x-forwarded-proto header (allowlisted to http/https only) when
  building the invite link origin so it shows https behind a TLS proxy
- Show the "View Draft Board" bare card in the right column while a
  draft is running, matching the card already shown for active/completed
  seasons

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-22 22:31:52 -07:00
2 changed files with 11 additions and 27 deletions

View file

@ -18,8 +18,6 @@ export interface DraftInfoCardProps {
isDraftOrderSet: boolean;
/** true when season status is pre_draft or draft */
isDraftOrPreDraft: boolean;
/** true when season status is specifically draft (live) */
isDraft?: boolean;
draftDateTime?: string | Date | null;
draftBoardHref: string;
draftRoomHref: string;
@ -58,10 +56,8 @@ function DraftInfoCardVariant({
draftIncrementTime,
sportsCount,
isDraftOrderSet,
isDraft,
draftDateTime,
draftTimezone,
draftBoardHref,
draftRoomHref,
queueBuilderHref,
userDraftPosition,
@ -119,26 +115,15 @@ function DraftInfoCardVariant({
<GradientIcon icon={LayoutGrid} className="h-5 w-5 shrink-0" />
<h2 className="text-xl font-bold leading-none tracking-tight">Draft Info</h2>
</div>
<div className="flex items-center gap-3">
{isDraft && (
<Link
to={draftBoardHref}
className="flex items-center gap-0.5 text-xs font-semibold uppercase tracking-wide text-electric hover:underline"
>
View Draft Board
<ChevronRight className="h-3.5 w-3.5" />
</Link>
)}
{isDraftOrderSet ? (
<Button asChild>
<Link to={draftRoomHref}>Enter Draft Room</Link>
</Button>
) : queueBuilderHref ? (
<Button asChild variant="outline">
<Link to={queueBuilderHref}>Set Pre-Draft Queue</Link>
</Button>
) : null}
</div>
{isDraftOrderSet ? (
<Button asChild>
<Link to={draftRoomHref}>Enter Draft Room</Link>
</Button>
) : queueBuilderHref ? (
<Button asChild variant="outline">
<Link to={queueBuilderHref}>Set Pre-Draft Queue</Link>
</Button>
) : null}
</div>
</CardHeader>

View file

@ -228,7 +228,6 @@ export default function LeagueHome({ loaderData }: Route.ComponentProps) {
sportsCount={sportsCount}
isDraftOrderSet={isDraftOrderSet}
isDraftOrPreDraft={isDraftOrPreDraft}
isDraft={season.status === "draft"}
draftDateTime={season.draftDateTime}
draftTimezone={currentUserTimezone ?? season.overnightPauseTimezone}
draftBoardHref={`/leagues/${league.id}/draft-board/${season.id}`}
@ -330,8 +329,8 @@ export default function LeagueHome({ loaderData }: Route.ComponentProps) {
/>
)}
{/* Draft historical view - active/completed only */}
{season && isActiveOrCompleted && (
{/* Draft historical view - active/completed/draft */}
{season && (isActiveOrCompleted || season.status === "draft") && (
<DraftInfoCard
draftRounds={season.draftRounds}
draftTimerMode={season.draftTimerMode}