diff --git a/web/components/answers/answer-bet-panel.tsx b/web/components/answers/answer-bet-panel.tsx index 6e54b3b8..f84ff1a3 100644 --- a/web/components/answers/answer-bet-panel.tsx +++ b/web/components/answers/answer-bet-panel.tsx @@ -26,7 +26,7 @@ import { Bet } from 'common/bet' import { track } from 'web/lib/service/analytics' import { BetSignUpPrompt } from '../sign-up-prompt' import { isIOS } from 'web/lib/util/device' -import { AlertBox } from '../alert-box' +import { WarningConfirmationButton } from '../warning-confirmation-button' export function AnswerBetPanel(props: { answer: Answer @@ -116,6 +116,15 @@ export function AnswerBetPanel(props: { const bankrollFraction = (betAmount ?? 0) / (user?.balance ?? 1e9) + const warning = + (betAmount ?? 0) > 10 && bankrollFraction >= 0.5 && bankrollFraction <= 1 + ? `You might not want to spend ${formatPercent( + bankrollFraction + )} of your balance on a single bet. \n\nCurrent balance: ${formatMoney( + user?.balance ?? 0 + )}` + : undefined + return (
{warning}
+