+ {OPTION_ORDER.map((state) => {
+ const { label } = OPTIONS[state];
+ const isActive = localState === state;
+ return (
+
+ );
+ })}
+ {isMyTurn && (
+
+ You're on the clock!
+
+ )}
+
+ );
+}
+
+export function AutodraftBadgeWithPopover({
+ seasonId,
+ teamId,
+ isEnabled,
+ mode,
+ queueOnly,
+ isMyTurn,
+ onUpdate,
+}: AutodraftBadgeWithPopoverProps) {
+ const [open, setOpen] = useState(false);
+
+ return (
+ ;
- seasonId: string;
- teamId: string;
isMyTurn: boolean;
canPick: boolean;
- userAutodraft: {
- isEnabled: boolean;
- mode: "next_pick" | "while_on";
- queueOnly: boolean;
- };
onRemoveFromQueue: (queueId: string) => void;
- onAutodraftUpdate: (isEnabled: boolean, mode: "next_pick" | "while_on", queueOnly: boolean) => void;
onReorder: (participantIds: string[]) => void;
onMakePick?: (participantId: string) => void;
}
@@ -131,13 +122,9 @@ const SortableQueueItem = memo(function SortableQueueItem({
export const QueueSection = memo(function QueueSection({
queue,
availableParticipants,
- seasonId,
- teamId,
isMyTurn,
canPick,
- userAutodraft,
onRemoveFromQueue,
- onAutodraftUpdate,
onReorder,
onMakePick,
}: QueueSectionProps) {
@@ -187,7 +174,7 @@ export const QueueSection = memo(function QueueSection({
items={queueIds}
strategy={verticalListSortingStrategy}
>
-
+
{queue.map((item, index) => {
const participant = participantMap.get(item.participantId);
return (
@@ -207,17 +194,6 @@ export const QueueSection = memo(function QueueSection({
)}
-
- {/* Autodraft Settings */}
-
);
});
diff --git a/app/routes/leagues/$leagueId.draft.$seasonId.tsx b/app/routes/leagues/$leagueId.draft.$seasonId.tsx
index 65971b7..c828a9a 100644
--- a/app/routes/leagues/$leagueId.draft.$seasonId.tsx
+++ b/app/routes/leagues/$leagueId.draft.$seasonId.tsx
@@ -27,7 +27,7 @@ import { getTeamForPick } from "~/lib/draft-order";
import { useDraftNotifications } from "~/hooks/useDraftNotifications";
import { useMediaQuery } from "~/hooks/useMediaQuery";
import { NotificationSettings } from "~/components/NotificationSettings";
-import { AutodraftSettings, getAutodraftLabel } from "~/components/AutodraftSettings";
+import { AutodraftSettings, getAutodraftLabel, AutodraftBadgeWithPopover } from "~/components/AutodraftSettings";
import { toast } from "sonner";
import { formatClockTime, getTimerColorClass } from "~/lib/draft-timer";
import { Users, LayoutGrid, ListChecks, Settings, ListOrdered } from "lucide-react";
@@ -1581,13 +1581,9 @@ export default function DraftRoom() {
? {
queue,
availableParticipants,
- seasonId: season.id,
- teamId: userTeam.id,
isMyTurn,
canPick,
- userAutodraft,
onRemoveFromQueue: handleRemoveFromQueue,
- onAutodraftUpdate: handleAutodraftUpdate,
onReorder: handleReorderQueue,
onMakePick: handleMakePick,
}
@@ -1723,6 +1719,38 @@ export default function DraftRoom() {
)}
+ {/* Desktop Tab Navigation Row */}
+
+
+ setActiveTab(value as "participants" | "board" | "rosters" | "summary")
+ }
+ >
+
+ Available Participants
+ Draft Board
+ Rosters
+ Summary
+
+
+ {userTeam && (
+
+ )}
+
+
{/* Main Content — single layout tree based on isMobile to avoid duplicate component instances */}
{isMobile ? (
@@ -1819,44 +1847,18 @@ export default function DraftRoom() {
)}
-
- setActiveTab(value as "participants" | "board" | "rosters" | "summary")
- }
- className="h-full flex flex-col"
- >
-
-
-
- Available Participants
- Draft Board
- Rosters
- Summary
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ {activeTab === "participants" && (
+
+ )}
+ {activeTab === "board" && (
+
+ )}
+ {activeTab === "rosters" && (
+
+ )}
+ {activeTab === "summary" && (
+
+ )}
)}