From 9f256aa7a87056968880c8d462f71cfee032f1a4 Mon Sep 17 00:00:00 2001 From: Sinclair Chen Date: Tue, 4 Oct 2022 17:48:24 -0700 Subject: [PATCH] refactor: require label on buy/confirm buttons --- web/components/warning-confirmation-button.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/web/components/warning-confirmation-button.tsx b/web/components/warning-confirmation-button.tsx index 7bf26165..a4094156 100644 --- a/web/components/warning-confirmation-button.tsx +++ b/web/components/warning-confirmation-button.tsx @@ -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 (