render "reply" or "replies", "comment" or "comments" depending on the count (singular or plural) (#382)
Co-authored-by: Keyan <34140557+huumn@users.noreply.github.com>
This commit is contained in:
parent
6e05cd38f9
commit
9941bc6519
|
@ -148,6 +148,7 @@ export default function Comment ({
|
|||
item={item}
|
||||
pendingSats={pendingSats}
|
||||
commentsText='replies'
|
||||
commentTextSingular='reply'
|
||||
className={`${itemStyles.other} ${styles.other}`}
|
||||
embellishUser={op && <Badge bg='boost' className={`ms-1 ${styles.op} bg-opacity-75`}>OP</Badge>}
|
||||
extraInfo={
|
||||
|
|
|
@ -17,7 +17,7 @@ import BookmarkDropdownItem from './bookmark'
|
|||
import SubscribeDropdownItem from './subscribe'
|
||||
import { CopyLinkDropdownItem } from './share'
|
||||
|
||||
export default function ItemInfo ({ item, pendingSats, full, commentsText, className, embellishUser, extraInfo, onEdit, editText }) {
|
||||
export default function ItemInfo ({ item, pendingSats, full, commentsText, commentTextSingular, className, embellishUser, extraInfo, onEdit, editText }) {
|
||||
const editThreshold = new Date(item.createdAt).getTime() + 10 * 60000
|
||||
const me = useMe()
|
||||
const router = useRouter()
|
||||
|
@ -58,7 +58,7 @@ export default function ItemInfo ({ item, pendingSats, full, commentsText, class
|
|||
}
|
||||
}} title={numWithUnits(item.commentSats)} className='text-reset position-relative'
|
||||
>
|
||||
{item.ncomments} {commentsText || 'comments'}
|
||||
{item.ncomments} {item.ncomments === 1 ? commentTextSingular || 'comment' : commentsText || 'comments'}
|
||||
{hasNewComments &&
|
||||
<span className={styles.notification}>
|
||||
<span className='invisible'>{' '}</span>
|
||||
|
|
Loading…
Reference in New Issue