import { Contract } from '../../lib/firebase/contracts' import { User } from '../../lib/firebase/users' import { Col } from '../layout/col' import { SiteLink } from '../site-link' import { ContractCard } from './contract-card' import { ContractSearch } from '../contract-search' import { useIsVisible } from 'web/hooks/use-is-visible' import { useEffect, useState } from 'react' export function ContractsGrid(props: { contracts: Contract[] loadMore: () => void hasMore: boolean showCloseTime?: boolean }) { const { contracts, showCloseTime, hasMore, loadMore } = props const [elem, setElem] = useState(null) const isBottomVisible = useIsVisible(elem) useEffect(() => { if (isBottomVisible) { loadMore() } }, [isBottomVisible, hasMore, loadMore]) if (contracts.length === 0) { return (

No markets found. Why not{' '} create one?

) } return (
) } export function CreatorContractsList(props: { creator: User }) { const { creator } = props return ( ) }