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

View file

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