OP indicator

This commit is contained in:
keyan 2021-10-27 13:26:34 -05:00
parent 4421dd6e6e
commit da4c65aeba
3 changed files with 11 additions and 1 deletions

View File

@ -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>

View File

@ -20,6 +20,10 @@ export const COMMENT_FIELDS = gql`
root {
id
title
user {
name
id
}
}
}
`

View File

@ -22,6 +22,10 @@ export const ITEM_FIELDS = gql`
root {
id
title
user {
name
id
}
}
}`