0ec15ff2f8
* add subsidy * drizzle liquidity * update liquidity panel * remove addliquidity * update cloud functions index * remove json endpoints * imports * drizzle liquidity: add velocity; dev script; run every minute * adjust speed * logging * liquidity button, dialog * modal size * modal * info table * pay back excess liquidity * remove client withdrawal * house liquidity subsidy * disable liquidity button if market resolved or closed * format tip amount
46 lines
1.6 KiB
TypeScript
46 lines
1.6 KiB
TypeScript
import { ShareIcon } from '@heroicons/react/outline'
|
|
import { Row } from '../layout/row'
|
|
import { Contract } from 'web/lib/firebase/contracts'
|
|
import React, { useState } from 'react'
|
|
import { Button } from 'web/components/button'
|
|
import { useUser } from 'web/hooks/use-user'
|
|
import { ShareModal } from './share-modal'
|
|
import { FollowMarketButton } from 'web/components/follow-market-button'
|
|
import { LikeMarketButton } from 'web/components/contract/like-market-button'
|
|
import { ContractInfoDialog } from 'web/components/contract/contract-info-dialog'
|
|
import { Tooltip } from '../tooltip'
|
|
import { LiquidityButton } from './liquidity-button'
|
|
|
|
export function ExtraContractActionsRow(props: { contract: Contract }) {
|
|
const { contract } = props
|
|
const user = useUser()
|
|
const [isShareOpen, setShareOpen] = useState(false)
|
|
|
|
return (
|
|
<Row>
|
|
<FollowMarketButton contract={contract} user={user} />
|
|
{contract.mechanism === 'cpmm-1' && (
|
|
<LiquidityButton contract={contract} user={user} />
|
|
)}
|
|
<LikeMarketButton contract={contract} user={user} />
|
|
<Tooltip text="Share" placement="bottom" noTap noFade>
|
|
<Button
|
|
size="sm"
|
|
color="gray-white"
|
|
className={'flex'}
|
|
onClick={() => setShareOpen(true)}
|
|
>
|
|
<ShareIcon className="h-5 w-5" aria-hidden />
|
|
<ShareModal
|
|
isOpen={isShareOpen}
|
|
setOpen={setShareOpen}
|
|
contract={contract}
|
|
user={user}
|
|
/>
|
|
</Button>
|
|
</Tooltip>
|
|
<ContractInfoDialog contract={contract} user={user} />
|
|
</Row>
|
|
)
|
|
}
|