feat: Simplify disabled state logic for autodraft settings controls
This commit is contained in:
parent
f0c289353e
commit
88b44b4616
1 changed files with 6 additions and 6 deletions
|
|
@ -107,7 +107,7 @@ export function AutodraftSettings({
|
|||
id="autodraft-switch"
|
||||
checked={localEnabled}
|
||||
onCheckedChange={handleToggle}
|
||||
disabled={isMyTurn || isUpdating}
|
||||
disabled={isMyTurn}
|
||||
/>
|
||||
</div>
|
||||
|
||||
|
|
@ -115,23 +115,23 @@ export function AutodraftSettings({
|
|||
<RadioGroup
|
||||
value={localMode}
|
||||
onValueChange={(value) => handleModeChange(value as "next_pick" | "while_on")}
|
||||
disabled={isMyTurn || isUpdating}
|
||||
disabled={isMyTurn}
|
||||
className="space-y-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
|
||||
htmlFor="next_pick"
|
||||
className={`text-sm ${isMyTurn || isUpdating ? "text-muted-foreground" : "cursor-pointer"}`}
|
||||
className={`text-sm ${isMyTurn ? "text-muted-foreground" : "cursor-pointer"}`}
|
||||
>
|
||||
Next Pick
|
||||
</Label>
|
||||
</div>
|
||||
<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
|
||||
htmlFor="while_on"
|
||||
className={`text-sm ${isMyTurn || isUpdating ? "text-muted-foreground" : "cursor-pointer"}`}
|
||||
className={`text-sm ${isMyTurn ? "text-muted-foreground" : "cursor-pointer"}`}
|
||||
>
|
||||
While On
|
||||
</Label>
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue