mirror of
https://gitlab.com/MrFry/qmining-page
synced 2026-04-28 11:17:37 +02:00
Added reactions on news items
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
import React from 'react'
|
||||
|
||||
import ReactButton from './reactButton.js'
|
||||
|
||||
import styles from './newsEntry.module.css'
|
||||
|
||||
export default function NewsEntry({ newsKey, newsItem, uid, onReact }) {
|
||||
return (
|
||||
<div>
|
||||
<div className={styles.newsContainer}>
|
||||
<div className={styles.itemNumber}>{newsKey} :</div>
|
||||
<div
|
||||
className={styles.newsTitle}
|
||||
dangerouslySetInnerHTML={{ __html: newsItem.title }}
|
||||
/>
|
||||
<div
|
||||
className={styles.newsBody}
|
||||
dangerouslySetInnerHTML={{ __html: newsItem.body }}
|
||||
/>
|
||||
</div>
|
||||
<ReactButton
|
||||
existingReacts={newsItem.reacts}
|
||||
uid={uid}
|
||||
onClick={onReact}
|
||||
/>
|
||||
<hr />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user