more reply placeholders
This commit is contained in:
parent
b6dcee4f26
commit
2b5a1cbfe9
|
@ -113,7 +113,6 @@ function TopLevelItem ({ item, noReply, ...props }) {
|
||||||
<Reply
|
<Reply
|
||||||
item={item}
|
item={item}
|
||||||
replyOpen
|
replyOpen
|
||||||
placeholder={item.ncomments > 3 ? 'fractions of a penny for your thoughts?' : 'early comments get more zaps'}
|
|
||||||
onCancelQuote={cancelQuote}
|
onCancelQuote={cancelQuote}
|
||||||
onQuoteReply={quoteReply}
|
onQuoteReply={quoteReply}
|
||||||
quote={quote}
|
quote={quote}
|
||||||
|
|
|
@ -2,7 +2,7 @@ import { Form, MarkdownInput } from '@/components/form'
|
||||||
import styles from './reply.module.css'
|
import styles from './reply.module.css'
|
||||||
import { COMMENTS } from '@/fragments/comments'
|
import { COMMENTS } from '@/fragments/comments'
|
||||||
import { useMe } from './me'
|
import { useMe } from './me'
|
||||||
import { forwardRef, useCallback, useEffect, useState, useRef } from 'react'
|
import { forwardRef, useCallback, useEffect, useState, useRef, useMemo } from 'react'
|
||||||
import Link from 'next/link'
|
import Link from 'next/link'
|
||||||
import { FeeButtonProvider, postCommentBaseLineItems, postCommentUseRemoteLineItems } from './fee-button'
|
import { FeeButtonProvider, postCommentBaseLineItems, postCommentUseRemoteLineItems } from './fee-button'
|
||||||
import { commentsViewedAfterComment } from '@/lib/new-comments'
|
import { commentsViewedAfterComment } from '@/lib/new-comments'
|
||||||
|
@ -34,7 +34,6 @@ export default forwardRef(function Reply ({
|
||||||
item,
|
item,
|
||||||
replyOpen,
|
replyOpen,
|
||||||
children,
|
children,
|
||||||
placeholder,
|
|
||||||
onQuoteReply,
|
onQuoteReply,
|
||||||
onCancelQuote,
|
onCancelQuote,
|
||||||
quote
|
quote
|
||||||
|
@ -53,6 +52,14 @@ export default forwardRef(function Reply ({
|
||||||
}
|
}
|
||||||
}, [replyOpen, quote, parentId])
|
}, [replyOpen, quote, parentId])
|
||||||
|
|
||||||
|
const placeholder = useMemo(() => {
|
||||||
|
return [
|
||||||
|
'comment for currency?',
|
||||||
|
'fractions of a penny for your thoughts?',
|
||||||
|
'put your money where your mouth is?'
|
||||||
|
][parentId % 3]
|
||||||
|
}, [parentId])
|
||||||
|
|
||||||
const onSubmit = useItemSubmit(CREATE_COMMENT, {
|
const onSubmit = useItemSubmit(CREATE_COMMENT, {
|
||||||
extraValues: { parentId },
|
extraValues: { parentId },
|
||||||
paidMutationOptions: {
|
paidMutationOptions: {
|
||||||
|
|
Loading…
Reference in New Issue