mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
React reload fix
This commit is contained in:
parent
21fdbb57a3
commit
42edd56d00
2 changed files with 13 additions and 13 deletions
|
@ -45,8 +45,8 @@ function Comment({ comment, index, onComment, onDelete, onReact, uid }) {
|
||||||
const commentStyle = admin
|
const commentStyle = admin
|
||||||
? styles.adminComment
|
? styles.adminComment
|
||||||
: own
|
: own
|
||||||
? styles.ownComment
|
? styles.ownComment
|
||||||
: ''
|
: ''
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={styles.comment}>
|
<div className={styles.comment}>
|
||||||
|
@ -210,16 +210,16 @@ export default function Comments({
|
||||||
) : null}
|
) : null}
|
||||||
</Modal>
|
</Modal>
|
||||||
) : null}
|
) : null}
|
||||||
<div
|
<div className={'actions'}>
|
||||||
className={'actions'}
|
<span
|
||||||
onClick={() => {
|
onClick={() => {
|
||||||
setCommentsShowing(true)
|
setCommentsShowing(true)
|
||||||
if (commentCount === 0) {
|
if (commentCount === 0) {
|
||||||
setAddingNewComment(true)
|
setAddingNewComment(true)
|
||||||
}
|
}
|
||||||
}}
|
}}
|
||||||
>
|
className={styles.comment_bttn}
|
||||||
<span className={styles.comment_bttn}>
|
>
|
||||||
{commentCount === 0
|
{commentCount === 0
|
||||||
? 'Új komment'
|
? 'Új komment'
|
||||||
: `Kommentek mutatása (${commentCount})`}
|
: `Kommentek mutatása (${commentCount})`}
|
||||||
|
|
|
@ -151,7 +151,7 @@ export default function Index({ globalData }) {
|
||||||
return res.json()
|
return res.json()
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
setNews(res.news)
|
setNews(updateForumPost(news, postKey, res.postData))
|
||||||
})
|
})
|
||||||
}}
|
}}
|
||||||
onCommentReact={({ path, reaction, isDelete }) => {
|
onCommentReact={({ path, reaction, isDelete }) => {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue