refactor: require label on buy/confirm buttons
This commit is contained in:
		
							parent
							
								
									7a271fce29
								
							
						
					
					
						commit
						9f256aa7a8
					
				|  | @ -18,7 +18,7 @@ export function WarningConfirmationButton(props: { | |||
|   openModalButtonClass?: string | ||||
|   color: ColorType | ||||
|   size: SizeType | ||||
|   actionLabel?: string | ||||
|   actionLabel: string | ||||
| }) { | ||||
|   const { | ||||
|     amount, | ||||
|  | @ -32,12 +32,11 @@ export function WarningConfirmationButton(props: { | |||
|     actionLabel, | ||||
|   } = props | ||||
| 
 | ||||
|   const label = capitalize(actionLabel) ?? 'Wager' | ||||
|   const buttonText = isSubmitting | ||||
|     ? 'Submitting...' | ||||
|     : amount | ||||
|     ? `${label} ${formatMoney(amount)}` | ||||
|     : label | ||||
|     ? `${actionLabel} ${formatMoney(amount)}` | ||||
|     : actionLabel | ||||
| 
 | ||||
|   if (!warning) { | ||||
|     return ( | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user