diff --git a/web/components/contract-search.tsx b/web/components/contract-search.tsx index 265b25c6..bf929fe6 100644 --- a/web/components/contract-search.tsx +++ b/web/components/contract-search.tsx @@ -9,7 +9,6 @@ import { } from './contract/contracts-grid' import { Row } from './layout/row' import { useEffect, useMemo, useState } from 'react' -import { Spacer } from './layout/spacer' import { ENV, IS_PRIVATE_MANIFOLD } from 'common/envs/constants' import { useUser } from 'web/hooks/use-user' import { useFollows } from 'web/hooks/use-follows' @@ -21,6 +20,7 @@ import { PillButton } from './buttons/pill-button' import { range, sortBy } from 'lodash' import { DEFAULT_CATEGORY_GROUPS } from 'common/categories' import { Col } from './layout/col' +import clsx from 'clsx' const searchClient = algoliasearch( 'GJQPAYENIF', @@ -65,6 +65,7 @@ export function ContractSearch(props: { hideGroupLink?: boolean hideQuickBet?: boolean } + headerClassName?: string }) { const { querySortOptions, @@ -75,6 +76,7 @@ export function ContractSearch(props: { showPlaceHolder, cardHideOptions, highlightOptions, + headerClassName, } = props const user = useUser() @@ -256,86 +258,89 @@ export function ContractSearch(props: { } return ( - - - updateQuery(e.target.value)} - placeholder={showPlaceHolder ? `Search ${filter} markets` : ''} - className="input input-bordered w-full" - /> - {!query && ( - + + selectSort(e.target.value as Sort)} - > - {sortOptions.map((option) => ( - - ))} - - )} - - - - - {pillsEnabled && ( - - - All - - - {user ? 'For you' : 'Featured'} - - - {user && ( - + + updateQuery(e.target.value)} + placeholder={showPlaceHolder ? `Search ${filter} markets` : ''} + className="input input-bordered w-full" + /> + {!query && ( + + )} + {!hideOrderSelector && !query && ( + )} - - {pillGroups.map(({ name, slug }) => { - return ( - - {name} - - ) - })} - )} - + {pillsEnabled && ( + + + All + + + {user ? 'For you' : 'Featured'} + + + {user && ( + + Your bets + + )} + + {pillGroups.map(({ name, slug }) => { + return ( + + {name} + + ) + })} + + )} + {filter === 'personal' && (follows ?? []).length === 0 && diff --git a/web/components/contract/contract-card.tsx b/web/components/contract/contract-card.tsx index 4ef90884..248c3863 100644 --- a/web/components/contract/contract-card.tsx +++ b/web/components/contract/contract-card.tsx @@ -76,7 +76,8 @@ export function ContractCard(props: {
{onClick ? ( diff --git a/web/components/editor/market-modal.tsx b/web/components/editor/market-modal.tsx index 598e112d..eb2bb9ce 100644 --- a/web/components/editor/market-modal.tsx +++ b/web/components/editor/market-modal.tsx @@ -42,49 +42,46 @@ export function MarketModal(props: { return ( - - + +
Embed a market
- - {!loading ? ( - - {contracts.length > 0 && ( - - )} - - - ) : ( - - - - )} - - + )} + +
+ )} + -
+ {loading && ( +
+ +
+ )} + +
c.id), - highlightClassName: '!bg-indigo-100 border-indigo-100 border-2', + highlightClassName: + '!bg-indigo-100 outline outline-2 outline-indigo-300', }} + headerClassName="bg-white" />