feat: Simplify disabled state logic for autodraft settings controls

This commit is contained in:
Chris Parsons 2025-10-26 20:52:11 -07:00
parent f0c289353e
commit 88b44b4616

View file

@ -107,7 +107,7 @@ export function AutodraftSettings({
id="autodraft-switch" id="autodraft-switch"
checked={localEnabled} checked={localEnabled}
onCheckedChange={handleToggle} onCheckedChange={handleToggle}
disabled={isMyTurn || isUpdating} disabled={isMyTurn}
/> />
</div> </div>
@ -115,23 +115,23 @@ export function AutodraftSettings({
<RadioGroup <RadioGroup
value={localMode} value={localMode}
onValueChange={(value) => handleModeChange(value as "next_pick" | "while_on")} onValueChange={(value) => handleModeChange(value as "next_pick" | "while_on")}
disabled={isMyTurn || isUpdating} disabled={isMyTurn}
className="space-y-2" className="space-y-2"
> >
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<RadioGroupItem value="next_pick" id="next_pick" disabled={isMyTurn || isUpdating} /> <RadioGroupItem value="next_pick" id="next_pick" disabled={isMyTurn} />
<Label <Label
htmlFor="next_pick" htmlFor="next_pick"
className={`text-sm ${isMyTurn || isUpdating ? "text-muted-foreground" : "cursor-pointer"}`} className={`text-sm ${isMyTurn ? "text-muted-foreground" : "cursor-pointer"}`}
> >
Next Pick Next Pick
</Label> </Label>
</div> </div>
<div className="flex items-center space-x-2"> <div className="flex items-center space-x-2">
<RadioGroupItem value="while_on" id="while_on" disabled={isMyTurn || isUpdating} /> <RadioGroupItem value="while_on" id="while_on" disabled={isMyTurn} />
<Label <Label
htmlFor="while_on" htmlFor="while_on"
className={`text-sm ${isMyTurn || isUpdating ? "text-muted-foreground" : "cursor-pointer"}`} className={`text-sm ${isMyTurn ? "text-muted-foreground" : "cursor-pointer"}`}
> >
While On While On
</Label> </Label>