Prettying stuff

This commit is contained in:
mrfry 2021-03-14 10:40:47 +01:00
parent b0cbc5aa5e
commit d06f76f6b1
12 changed files with 445 additions and 419 deletions

View file

@ -63,12 +63,13 @@ function Comment({ comment, index, onComment, onDelete, onReact, uid }) {
</div>
<div>User #{user}</div>
</div>
<div className={styles.commentDate}>{date}</div>
<div className={styles.commentDate}>{date}</div>
</div>
<div className={`${!displayed && styles.hidden}`}>
<div className={styles.commentText}> {content}</div>
<div className={'actions'}>
<span className={styles.reply_bttn}
<span
className={styles.reply_bttn}
onClick={() => {
setCommenting(true)
}}
@ -76,7 +77,8 @@ function Comment({ comment, index, onComment, onDelete, onReact, uid }) {
Válasz...
</span>
{own && (
<span className={styles.delete_bttn}
<span
className={styles.delete_bttn}
onClick={() => {
onDelete([index])
}}
@ -153,8 +155,8 @@ export default function Comments({
const [commentsShowing, setCommentsShowing] = useState(false)
const commentCount = comments ? countComments(comments) : 0
return (
<div>
return (
<div>
{commentsShowing ? (
<Modal
closeClick={() => {
@ -178,7 +180,8 @@ export default function Comments({
: null}
{commentCount !== 0 ? (
<div className={'actions'}>
<span className={styles.comment_bttn}
<span
className={styles.comment_bttn}
onClick={() => {
setAddingNewComment(true)
}}
@ -219,7 +222,9 @@ export default function Comments({
<span className={styles.comment_bttn}>
{commentCount === 0
? 'Új komment'
: `További ${commentCount} komment${commentCount > 1 ? ' mutatása' : ''}`}
: `További ${commentCount} komment${
commentCount > 1 ? ' mutatása' : ''
}`}
</span>
</div>
</div>