Only RichardHanania can create markets

This commit is contained in:
James Grugett 2022-06-24 12:00:21 -05:00
parent 84b2dc8fbd
commit 80ea611ba8
3 changed files with 25 additions and 20 deletions

View File

@ -305,6 +305,8 @@ export default function Sidebar(props: { className?: string }) {
buttonContent={<MoreButton />} buttonContent={<MoreButton />}
/> />
</div> </div>
{user?.username === 'RichardHanania' && (
<div>
<CreateQuestionButton user={user} /> <CreateQuestionButton user={user} />
{user && {user &&
@ -327,6 +329,8 @@ export default function Sidebar(props: { className?: string }) {
</Row> </Row>
) )
)} )}
</div>
)}
</nav> </nav>
) )
} }

View File

@ -73,6 +73,7 @@ export function NewContract(props: { question: string; groupId?: string }) {
useEffect(() => { useEffect(() => {
if (creator === null) router.push('/') if (creator === null) router.push('/')
if (creator && creator.username !== 'RichardHanania') router.push('/')
}, [creator]) }, [creator])
const [outcomeType, setOutcomeType] = useState<outcomeType>('BINARY') const [outcomeType, setOutcomeType] = useState<outcomeType>('BINARY')

View File

@ -191,7 +191,7 @@ export default function GroupPage(props: {
<Title className={'line-clamp-2'} text={group.name} /> <Title className={'line-clamp-2'} text={group.name} />
<span className={'text-gray-700'}>{group.about}</span> <span className={'text-gray-700'}>{group.about}</span>
</div> </div>
{isMember && ( {isMember && user?.username === 'RichardHanania' && (
<CreateQuestionButton <CreateQuestionButton
user={user} user={user}
overrideText={'Add a new question'} overrideText={'Add a new question'}