Only RichardHanania can create markets
This commit is contained in:
parent
84b2dc8fbd
commit
80ea611ba8
|
@ -305,27 +305,31 @@ export default function Sidebar(props: { className?: string }) {
|
||||||
buttonContent={<MoreButton />}
|
buttonContent={<MoreButton />}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<CreateQuestionButton user={user} />
|
{user?.username === 'RichardHanania' && (
|
||||||
|
<div>
|
||||||
|
<CreateQuestionButton user={user} />
|
||||||
|
|
||||||
{user &&
|
{user &&
|
||||||
mustWaitForFreeMarketStatus != 'loading' &&
|
mustWaitForFreeMarketStatus != 'loading' &&
|
||||||
mustWaitForFreeMarketStatus ? (
|
mustWaitForFreeMarketStatus ? (
|
||||||
<Row className="mt-2 justify-center">
|
<Row className="mt-2 justify-center">
|
||||||
<Row className="gap-1 text-sm text-gray-400">
|
<Row className="gap-1 text-sm text-gray-400">
|
||||||
Next free question in {countdown}
|
Next free question in {countdown}
|
||||||
</Row>
|
</Row>
|
||||||
</Row>
|
|
||||||
) : (
|
|
||||||
user &&
|
|
||||||
mustWaitForFreeMarketStatus != 'loading' &&
|
|
||||||
!mustWaitForFreeMarketStatus && (
|
|
||||||
<Row className="mt-2 justify-center">
|
|
||||||
<Row className="gap-1 text-sm text-indigo-400">
|
|
||||||
Daily free question
|
|
||||||
<SparklesIcon className="mt-0.5 h-4 w-4" aria-hidden="true" />
|
|
||||||
</Row>
|
</Row>
|
||||||
</Row>
|
) : (
|
||||||
)
|
user &&
|
||||||
|
mustWaitForFreeMarketStatus != 'loading' &&
|
||||||
|
!mustWaitForFreeMarketStatus && (
|
||||||
|
<Row className="mt-2 justify-center">
|
||||||
|
<Row className="gap-1 text-sm text-indigo-400">
|
||||||
|
Daily free question
|
||||||
|
<SparklesIcon className="mt-0.5 h-4 w-4" aria-hidden="true" />
|
||||||
|
</Row>
|
||||||
|
</Row>
|
||||||
|
)
|
||||||
|
)}
|
||||||
|
</div>
|
||||||
)}
|
)}
|
||||||
</nav>
|
</nav>
|
||||||
)
|
)
|
||||||
|
|
|
@ -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')
|
||||||
|
|
|
@ -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'}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user