2022-05-02 15:23:51 +00:00
|
|
|
import clsx from 'clsx'
|
2022-05-09 13:04:36 +00:00
|
|
|
import { Contract, contractUrl } from 'web/lib/firebase/contracts'
|
2022-05-02 15:23:51 +00:00
|
|
|
import { CopyLinkButton } from './copy-link-button'
|
|
|
|
import { Col } from './layout/col'
|
|
|
|
import { Row } from './layout/row'
|
|
|
|
|
|
|
|
export function ShareMarket(props: { contract: Contract; className?: string }) {
|
|
|
|
const { contract, className } = props
|
|
|
|
|
|
|
|
return (
|
|
|
|
<Col className={clsx(className, 'gap-3')}>
|
|
|
|
<div>Share your market</div>
|
|
|
|
<Row className="mb-6 items-center">
|
|
|
|
<input
|
|
|
|
className="input input-bordered flex-1 rounded-r-none text-gray-500"
|
2022-05-13 23:42:48 +00:00
|
|
|
readOnly
|
2022-05-02 15:23:51 +00:00
|
|
|
type="text"
|
|
|
|
value={contractUrl(contract)}
|
|
|
|
/>
|
|
|
|
<CopyLinkButton
|
|
|
|
contract={contract}
|
|
|
|
buttonClassName="btn-md rounded-l-none"
|
2022-05-17 15:55:26 +00:00
|
|
|
toastClassName={'-left-28 mt-1'}
|
2022-05-02 15:23:51 +00:00
|
|
|
/>
|
|
|
|
</Row>
|
|
|
|
</Col>
|
|
|
|
)
|
|
|
|
}
|