mirror of
https://gitlab.com/MrFry/qmining-page
synced 2025-04-01 20:23:44 +02:00
Added reactions on news items
This commit is contained in:
parent
62b35eac68
commit
64697efc96
10 changed files with 5711 additions and 87 deletions
29
src/components/newsEntry.js
Normal file
29
src/components/newsEntry.js
Normal file
|
@ -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>
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue