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"
|
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>
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue