From e79235afef5f5d55895af4bfbefa69ad17733f22 Mon Sep 17 00:00:00 2001 From: Ian Philips Date: Wed, 24 Aug 2022 16:41:46 -0600 Subject: [PATCH] Small ux tweaks for signed out market page --- web/components/amount-input.tsx | 5 +- web/components/bet-button.tsx | 36 +++++----- web/components/contract/contract-details.tsx | 67 ++++++++++++++----- web/components/contract/contract-overview.tsx | 10 ++- web/components/contract/share-row.tsx | 36 +++++----- 5 files changed, 105 insertions(+), 49 deletions(-) diff --git a/web/components/amount-input.tsx b/web/components/amount-input.tsx index cb071850..971a5496 100644 --- a/web/components/amount-input.tsx +++ b/web/components/amount-input.tsx @@ -5,6 +5,7 @@ import { formatMoney } from 'common/util/format' import { Col } from './layout/col' import { SiteLink } from './site-link' import { ENV_CONFIG } from 'common/envs/constants' +import { useWindowSize } from 'web/hooks/use-window-size' export function AmountInput(props: { amount: number | undefined @@ -33,7 +34,8 @@ export function AmountInput(props: { const isInvalid = !str || isNaN(amount) onChange(isInvalid ? undefined : amount) } - + const { width } = useWindowSize() + const isMobile = (width ?? 0) < 768 return (