Only RichardHanania can create questions
This commit is contained in:
parent
a6f4a5fc22
commit
6a5fe931dd
|
@ -204,7 +204,9 @@ export default function Sidebar(props: { className?: string }) {
|
|||
<nav aria-label="Sidebar" className={className}>
|
||||
<ManifoldLogo className="py-6" twoLine />
|
||||
|
||||
<CreateQuestionButton user={user} />
|
||||
{user?.username === 'RichardHanania' && (
|
||||
<CreateQuestionButton user={user} />
|
||||
)}
|
||||
<Spacer h={4} />
|
||||
{user && (
|
||||
<div className="w-full" style={{ minHeight: 80 }}>
|
||||
|
|
|
@ -57,6 +57,7 @@ export default function Create() {
|
|||
const creator = useUser()
|
||||
useEffect(() => {
|
||||
if (creator === null) router.push('/')
|
||||
if (creator?.username !== 'RichardHanania') router.push('/')
|
||||
}, [creator, router])
|
||||
|
||||
if (!router.isReady || !creator) return <div />
|
||||
|
|
|
@ -42,16 +42,6 @@ const Home = () => {
|
|||
}}
|
||||
/>
|
||||
</Col>
|
||||
<button
|
||||
type="button"
|
||||
className="fixed bottom-[70px] right-3 inline-flex items-center rounded-full border border-transparent bg-indigo-600 p-3 text-white shadow-sm hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2 lg:hidden"
|
||||
onClick={() => {
|
||||
router.push('/create')
|
||||
track('mobile create button')
|
||||
}}
|
||||
>
|
||||
<PlusSmIcon className="h-8 w-8" aria-hidden="true" />
|
||||
</button>
|
||||
</Page>
|
||||
|
||||
{contract && (
|
||||
|
|
Loading…
Reference in New Issue
Block a user