mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Added admin comments, styling
This commit is contained in:
parent
71911063b0
commit
a09e9734da
4 changed files with 56 additions and 25 deletions
|
@ -33,12 +33,18 @@ function CommentInput({ onSubmit }) {
|
|||
function Comment({ comment, index, onComment, onDelete, onReact, uid }) {
|
||||
const [displayed, setDisplayed] = useState(true)
|
||||
const [commenting, setCommenting] = useState(false)
|
||||
const { text, subComments, date, user, reacts } = comment
|
||||
const { text, subComments, date, user, reacts, adminComment } = comment
|
||||
const own = uid === user
|
||||
|
||||
const commentStyle = adminComment
|
||||
? styles.adminComment
|
||||
: own
|
||||
? styles.ownComment
|
||||
: ''
|
||||
|
||||
return (
|
||||
<div className={styles.comment}>
|
||||
<div className={`${styles.commentData} ${own && styles.ownComment}`}>
|
||||
<div className={`${styles.commentData} ${commentStyle}`}>
|
||||
<div className={styles.commentHeader}>
|
||||
<div className={styles.userContainer}>
|
||||
<div
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue