Only warm up sell bet function once
This commit is contained in:
parent
bf8e09b6c1
commit
9eb7335cf6
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user