import clsx from 'clsx' import { ShareIcon } from '@heroicons/react/outline' import { Row } from '../layout/row' import { Contract } from 'web/lib/firebase/contracts' import { useState } from 'react' import { Button } from 'web/components/button' import { CreateChallengeModal } from '../challenges/create-challenge-modal' import { User } from 'common/user' import { CHALLENGES_ENABLED } from 'common/challenge' import { ShareModal } from './share-modal' export function ShareRow(props: { contract: Contract user: User | undefined | null }) { const { user, contract } = props const { outcomeType, resolution } = contract const showChallenge = user && outcomeType === 'BINARY' && !resolution && CHALLENGES_ENABLED const [isOpen, setIsOpen] = useState(false) const [isShareOpen, setShareOpen] = useState(false) return ( {showChallenge && ( )} ) }