import React from 'react' import ReactButton from './reactButton.js' import Comments from './comments.js' import styles from './newsEntry.module.css' export default function NewsEntry({ newsItem, uid, onCommentReact, onNewsReact, onComment, onDelete, onPostDelete, }) { const { reacts, title, content, user, comments, date, admin } = newsItem return (
{title}
User #{user}
@ {date}
{admin ? (
) : (
{content}
)}
{uid === user ? ( { onPostDelete() }} > Törlés ) : null} { onNewsReact({ reaction, isDelete }) }} />
{ onCommentReact({ path, reaction, isDelete }) }} onComment={onComment} onDelete={onDelete} comments={comments} />
) }