@@ -139,8 +139,6 @@ function TicketPurchase({
139
139
const fetcher = useFetcher ( ) ;
140
140
const isSubmitting = fetcher . state !== "idle" ;
141
141
142
- const disabled = isSoldOut || isSubmitting ;
143
-
144
142
return (
145
143
< div className = "z-10 flex w-[90%] flex-col items-center gap-3" >
146
144
< fetcher . Form
@@ -162,7 +160,7 @@ function TicketPurchase({
162
160
className = "size-6 text-white/30 transition-colors hover:text-white disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:text-white/30 md:size-8"
163
161
aria-label = "Decrease quantity"
164
162
onClick = { ( ) => setQuantity ( Math . max ( 1 , quantity - 1 ) ) }
165
- disabled = { quantity <= 1 || disabled }
163
+ disabled = { quantity <= 1 || isSoldOut }
166
164
>
167
165
< svg aria-hidden viewBox = "0 0 24 24" >
168
166
< use href = { `${ iconsHref } #circle-minus` } />
@@ -183,7 +181,7 @@ function TicketPurchase({
183
181
className = "size-6 text-white/30 transition-colors hover:text-white disabled:cursor-not-allowed disabled:opacity-30 disabled:hover:text-white/30 md:size-8"
184
182
aria-label = "Increase quantity"
185
183
onClick = { ( ) => setQuantity ( quantity + 1 ) }
186
- disabled = { quantity >= maxQuantity || disabled }
184
+ disabled = { quantity >= maxQuantity || isSoldOut }
187
185
>
188
186
< svg aria-hidden viewBox = "0 0 24 24" >
189
187
< use href = { `${ iconsHref } #circle-plus` } />
@@ -193,7 +191,8 @@ function TicketPurchase({
193
191
</ div >
194
192
< JamButton
195
193
type = "submit"
196
- disabled = { disabled }
194
+ disabled = { isSoldOut }
195
+ active = { isSubmitting }
197
196
className = "w-full md:w-auto"
198
197
>
199
198
{ isSoldOut ? "Sold Out" : isSubmitting ? "Processing..." : "Checkout" }
0 commit comments