OP indicator
This commit is contained in:
parent
4421dd6e6e
commit
da4c65aeba
|
@ -60,6 +60,8 @@ export default function Comment ({
|
|||
}
|
||||
}, [item])
|
||||
|
||||
const op = item.root.user.name === item.user.name
|
||||
|
||||
return (
|
||||
<div
|
||||
ref={ref} className={includeParent ? '' : `${styles.comment} ${collapse ? styles.collapsed : ''}`}
|
||||
|
@ -86,7 +88,7 @@ export default function Comment ({
|
|||
</Link>
|
||||
<span> \ </span>
|
||||
<Link href={`/${item.user.name}`} passHref>
|
||||
<a onClick={e => e.stopPropagation()}>@{item.user.name}</a>
|
||||
<a onClick={e => e.stopPropagation()}>@{item.user.name}<span className='text-muted font-weight-bold'>{op && ' OP'}</span></a>
|
||||
</Link>
|
||||
<span> </span>
|
||||
<span>{timeSince(new Date(item.createdAt))}</span>
|
||||
|
|
|
@ -20,6 +20,10 @@ export const COMMENT_FIELDS = gql`
|
|||
root {
|
||||
id
|
||||
title
|
||||
user {
|
||||
name
|
||||
id
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
|
|
|
@ -22,6 +22,10 @@ export const ITEM_FIELDS = gql`
|
|||
root {
|
||||
id
|
||||
title
|
||||
user {
|
||||
name
|
||||
id
|
||||
}
|
||||
}
|
||||
}`
|
||||
|
||||
|
|
Loading…
Reference in New Issue