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
|
@ -13,29 +13,35 @@ export default function NewsEntry({
|
|||
onComment,
|
||||
onDelete,
|
||||
}) {
|
||||
const { reacts, title, body, comments } = newsItem
|
||||
const { reacts, title, text, user, comments, date, adminPost } = newsItem
|
||||
|
||||
return (
|
||||
<div>
|
||||
<div className={styles.newsContainer}>
|
||||
<div className={styles.itemNumber}>{newsKey} :</div>
|
||||
<div
|
||||
className={styles.newsTitle}
|
||||
dangerouslySetInnerHTML={{ __html: title }}
|
||||
/>
|
||||
<div
|
||||
className={`${styles.newsContainer} ${adminPost && styles.adminPost}`}
|
||||
>
|
||||
<div className={styles.newsHeader}>
|
||||
<div
|
||||
className={styles.newsTitle}
|
||||
dangerouslySetInnerHTML={{ __html: title }}
|
||||
/>
|
||||
<div className={styles.user}>
|
||||
<div>User #{user}</div>
|
||||
<div className={styles.newsDate}>{date}</div>
|
||||
</div>
|
||||
</div>
|
||||
<div
|
||||
className={styles.newsBody}
|
||||
dangerouslySetInnerHTML={{ __html: body }}
|
||||
dangerouslySetInnerHTML={{ __html: text }}
|
||||
/>
|
||||
<ReactButton
|
||||
existingReacts={reacts}
|
||||
uid={uid}
|
||||
onClick={(reaction, isDelete) => {
|
||||
onReact({ type: 'news', reaction, isDelete })
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
<ReactButton
|
||||
existingReacts={reacts}
|
||||
uid={uid}
|
||||
onClick={(reaction, isDelete) => {
|
||||
onReact({ type: 'news', reaction, isDelete })
|
||||
}}
|
||||
/>
|
||||
<hr />
|
||||
<Comments
|
||||
uid={uid}
|
||||
onReact={(path, reaction, isDelete) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue