diff --git a/web/components/contract/contract-card.tsx b/web/components/contract/contract-card.tsx
index 24658342..dab92a7a 100644
--- a/web/components/contract/contract-card.tsx
+++ b/web/components/contract/contract-card.tsx
@@ -106,7 +106,7 @@ export function ContractCard(props: {
<>
{outcomeType === 'BINARY' && (
)}
diff --git a/web/components/contract/contract-details.tsx b/web/components/contract/contract-details.tsx
index bb89c69d..b06522e7 100644
--- a/web/components/contract/contract-details.tsx
+++ b/web/components/contract/contract-details.tsx
@@ -106,6 +106,11 @@ export function AvatarDetails(props: {
)
}
+export function getIsMobile() {
+ const { width } = useWindowSize()
+ return (width ?? 0) < 600
+}
+
export function ContractDetails(props: {
contract: Contract
disabled?: boolean
@@ -123,7 +128,7 @@ export function ContractDetails(props: {
const user = useUser()
const isCreator = user?.id === creatorId
const { width } = useWindowSize()
- const isMobile = (width ?? 0) < 600
+ const isMobile = getIsMobile()
return (
@@ -136,7 +141,7 @@ export function ContractDetails(props: {
className="mr-1.5"
/>
{!disabled && (
-
+
)}
@@ -234,7 +239,7 @@ export function MarketGroups(props: {
isMobile ? 'max-w-[140px]' : 'max-w-[250px]'
)}
>
-
+
{groupToDisplay.name}
@@ -248,7 +253,7 @@ export function MarketGroups(props: {
>
No Group
@@ -268,7 +273,7 @@ export function MarketGroups(props: {
{groupInfo}
{user && (