From 6706fe73501b42266378c9aa8b27689de85b46a7 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Thu, 1 Sep 2022 08:12:46 -0600 Subject: [PATCH] Show user balance on bet panels --- web/components/answers/answer-bet-panel.tsx | 7 +++++-- web/components/answers/create-answer-panel.tsx | 9 +++++++-- web/components/bet-panel.tsx | 18 ++++++++++++++---- 3 files changed, 26 insertions(+), 8 deletions(-) diff --git a/web/components/answers/answer-bet-panel.tsx b/web/components/answers/answer-bet-panel.tsx index f04d752f..c5897056 100644 --- a/web/components/answers/answer-bet-panel.tsx +++ b/web/components/answers/answer-bet-panel.tsx @@ -1,5 +1,5 @@ import clsx from 'clsx' -import { useEffect, useRef, useState } from 'react' +import React, { useEffect, useRef, useState } from 'react' import { XIcon } from '@heroicons/react/solid' import { Answer } from 'common/answer' @@ -132,7 +132,10 @@ export function AnswerBetPanel(props: { )} -
Amount
+ + Amount + (balance: {formatMoney(user?.balance ?? 0)}) + -
Bet amount
+ + Bet Amount + + (balance: {formatMoney(user?.balance ?? 0)}) + + {' '} -
Amount
+ + Amount + + (balance: {formatMoney(user?.balance ?? 0)}) + + )} -
- Max amount* -
+ + + Max amount* + + + (balance: {formatMoney(user?.balance ?? 0)}) + +