Group question => market

This commit is contained in:
James Grugett 2022-08-13 13:49:25 -05:00
parent 456d9398a1
commit aeea66491a

View File

@ -1,5 +1,4 @@
import { debounce, sortBy, take } from 'lodash' import { debounce, sortBy, take } from 'lodash'
import PlusSmIcon from '@heroicons/react/solid/PlusSmIcon'
import { Group, GROUP_CHAT_SLUG } from 'common/group' import { Group, GROUP_CHAT_SLUG } from 'common/group'
import { Page } from 'web/components/page' import { Page } from 'web/components/page'
@ -38,7 +37,6 @@ import { toast } from 'react-hot-toast'
import { useCommentsOnGroup } from 'web/hooks/use-comments' import { useCommentsOnGroup } from 'web/hooks/use-comments'
import { REFERRAL_AMOUNT } from 'common/user' import { REFERRAL_AMOUNT } from 'common/user'
import { ContractSearch } from 'web/components/contract-search' import { ContractSearch } from 'web/components/contract-search'
import clsx from 'clsx'
import { FollowList } from 'web/components/follow-list' import { FollowList } from 'web/components/follow-list'
import { SearchIcon } from '@heroicons/react/outline' import { SearchIcon } from '@heroicons/react/outline'
import { useTipTxns } from 'web/hooks/use-tip-txns' import { useTipTxns } from 'web/hooks/use-tip-txns'
@ -557,32 +555,29 @@ function AddContractButton(props: { group: Group; user: User }) {
return ( return (
<> <>
<div className={'flex justify-center'}> <div className={'flex justify-center'}>
<button <Button size="sm" color="gradient" onClick={() => setOpen(true)}>
className={clsx('btn btn-sm btn-outline')} Add market
onClick={() => setOpen(true)} </Button>
>
<PlusSmIcon className="h-6 w-6" aria-hidden="true" /> question
</button>
</div> </div>
<Modal open={open} setOpen={setOpen} className={'sm:p-0'} size={'lg'}> <Modal open={open} setOpen={setOpen} className={'sm:p-0'} size={'lg'}>
<Col className={' w-full gap-4 rounded-md bg-white'}> <Col className={' w-full gap-4 rounded-md bg-white'}>
<Col className="p-8 pb-0"> <Col className="p-8 pb-0">
<div className={'text-xl text-indigo-700'}> <div className={'text-xl text-indigo-700'}>
Add a question to your group Add a market to your group
</div> </div>
{contracts.length === 0 ? ( {contracts.length === 0 ? (
<Col className="items-center justify-center"> <Col className="items-center justify-center">
<CreateQuestionButton <CreateQuestionButton
user={user} user={user}
overrideText={'New question'} overrideText={'New market'}
className={'w-48 flex-shrink-0 '} className={'w-48 flex-shrink-0 '}
query={`?groupId=${group.id}`} query={`?groupId=${group.id}`}
/> />
<div className={'mt-1 text-lg text-gray-600'}> <div className={'mt-1 text-lg text-gray-600'}>
(or select old questions) (or select old markets)
</div> </div>
</Col> </Col>
) : ( ) : (