Only warm up sell bet function once

This commit is contained in:
Marshall Polaris 2022-05-04 14:10:54 -07:00
parent bf8e09b6c1
commit 9eb7335cf6

View File

@ -553,10 +553,11 @@ function BetRow(props: { bet: Bet; contract: Contract; saleBet?: Bet }) {
)
}
const warmUpSellBet = _.throttle(() => sellBet({}).catch(), 5000 /* ms */)
function SellButton(props: { contract: Contract; bet: Bet }) {
useEffect(() => {
// warm up cloud function
sellBet({}).catch()
warmUpSellBet()
}, [])
const { contract, bet } = props