From 708773e9a6db8866624c8cef6d26d67542bf31d3 Mon Sep 17 00:00:00 2001 From: James Grugett Date: Mon, 4 Apr 2022 11:30:47 -0500 Subject: [PATCH] Fix FR not having correct loan info --- web/components/answers/answer-bet-panel.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/web/components/answers/answer-bet-panel.tsx b/web/components/answers/answer-bet-panel.tsx index 7c05ff63..51899034 100644 --- a/web/components/answers/answer-bet-panel.tsx +++ b/web/components/answers/answer-bet-panel.tsx @@ -25,6 +25,7 @@ import { } from '../../../common/calculate-dpm' import { firebaseLogin } from '../../lib/firebase/users' import { Bet } from '../../../common/bet' +import { useUserContractBets } from '../../hooks/use-user-bets' export function AnswerBetPanel(props: { answer: Answer @@ -37,6 +38,7 @@ export function AnswerBetPanel(props: { const { id: answerId } = answer const user = useUser() + const userBets = useUserContractBets(user?.id, contract.id) const [betAmount, setBetAmount] = useState(undefined) const [error, setError] = useState() @@ -123,6 +125,7 @@ export function AnswerBetPanel(props: { disabled={isSubmitting} inputRef={inputRef} contractIdForLoan={contract.id} + userBets={userBets} />