Skip to content

Commit 18c0167

Browse files
committed
fix: Update button disabled state logic based on pending draw count
1 parent d6c3bfe commit 18c0167

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/DotNetDevLottery/Components/Random/MachineAnimation.razor

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
<FluentButton
1818
OnClick="OnClickButton"
1919
Appearance="@(Status == DrawMachineStatus.Pending ? Appearance.Neutral : Appearance.Accent)"
20-
Disabled="@(Status == DrawMachineStatus.Pending)"
20+
Disabled="@(Status == DrawMachineStatus.Pending && PendingDrawCount == 0)"
2121
class="@TriggerButtonClass(Status == DrawMachineStatus.Pending)">
2222
추첨 진행
2323
</FluentButton>

src/DotNetDevLottery/Components/Random/MachineAnimation.razor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -162,9 +162,9 @@ public async Task OnDrawMachineAnimationEnd()
162162
}
163163
PendingDrawCount--;
164164

165-
if (PendingDrawCount <= 0)
165+
if (PendingDrawCount != 0)
166166
{
167-
Status = DrawMachineStatus.Done;
167+
Status = DrawMachineStatus.Pending;
168168
}
169169

170170
await OnDrawAnimationEnd.InvokeAsync(new DrawAnimationEndEventArgs

0 commit comments

Comments
 (0)