crosspost to nostr checkbox only appears on discussion forms

This commit is contained in:
austinkelsay 2023-10-09 16:08:33 -05:00
parent 8ace053be5
commit 06c55be6a5
1 changed files with 3 additions and 1 deletions

View File

@ -7,6 +7,7 @@ import Info from './info'
import { numWithUnits } from '../lib/format' import { numWithUnits } from '../lib/format'
import styles from './adv-post-form.module.css' import styles from './adv-post-form.module.css'
import { useMe } from './me' import { useMe } from './me'
import { useRouter } from 'next/router'
const EMPTY_FORWARD = { nym: '', pct: '' } const EMPTY_FORWARD = { nym: '', pct: '' }
@ -19,6 +20,7 @@ export function AdvPostInitial ({ forward, boost }) {
export default function AdvPostForm () { export default function AdvPostForm () {
const me = useMe() const me = useMe()
const router = useRouter()
return ( return (
<AccordianItem <AccordianItem
@ -81,7 +83,7 @@ export default function AdvPostForm () {
) )
}} }}
</VariableInput> </VariableInput>
{me && {me && router.query.type === 'discussion' &&
<Checkbox <Checkbox
label={ label={
<div className='d-flex align-items-center'>crosspost to nostr <div className='d-flex align-items-center'>crosspost to nostr