hide quick bet on mobile
This commit is contained in:
parent
d63dd12056
commit
3d073da97e
|
@ -32,6 +32,7 @@ import { track } from '@amplitude/analytics-browser'
|
||||||
import { trackCallback } from 'web/lib/service/analytics'
|
import { trackCallback } from 'web/lib/service/analytics'
|
||||||
import { getMappedValue } from 'common/pseudo-numeric'
|
import { getMappedValue } from 'common/pseudo-numeric'
|
||||||
import { Tooltip } from '../tooltip'
|
import { Tooltip } from '../tooltip'
|
||||||
|
import { useWindowSize } from 'web/hooks/use-window-size'
|
||||||
|
|
||||||
export function ContractCard(props: {
|
export function ContractCard(props: {
|
||||||
contract: Contract
|
contract: Contract
|
||||||
|
@ -61,7 +62,11 @@ export function ContractCard(props: {
|
||||||
const marketClosed =
|
const marketClosed =
|
||||||
(contract.closeTime || Infinity) < Date.now() || !!resolution
|
(contract.closeTime || Infinity) < Date.now() || !!resolution
|
||||||
|
|
||||||
|
const { width } = useWindowSize()
|
||||||
|
const isMobile = (width ?? 0) < 768
|
||||||
|
|
||||||
const showQuickBet =
|
const showQuickBet =
|
||||||
|
!isMobile &&
|
||||||
user &&
|
user &&
|
||||||
!marketClosed &&
|
!marketClosed &&
|
||||||
(outcomeType === 'BINARY' || outcomeType === 'PSEUDO_NUMERIC') &&
|
(outcomeType === 'BINARY' || outcomeType === 'PSEUDO_NUMERIC') &&
|
||||||
|
|
Loading…
Reference in New Issue
Block a user