Add: show file in ReviewEntry
This commit is contained in:
@@ -8,15 +8,19 @@ function ReviewEntry(props) {
|
||||
<Link to={`/manage/users/${props.review.user.id}`}>
|
||||
@{props.review.user.username}
|
||||
</Link>{" "}
|
||||
wrote on {convertIntToDateTime(props.review.created_at)}{" "}
|
||||
review{" "}
|
||||
<Link to={`/files/${props.review.file.id}`}>
|
||||
{props.review.file.filename}
|
||||
</Link>{" "}
|
||||
on {convertIntToDateTime(props.review.created_at)}{" "}
|
||||
{props.review.updated_at !== 0 &&
|
||||
"(modified on " +
|
||||
convertIntToDateTime(props.review.updated_at) +
|
||||
")"}{" "}
|
||||
{(props.user.role === 1 || props.review.user.id === props.user.id) &&
|
||||
props.user.role !== 0 &&
|
||||
props.user.role !== 0 && (
|
||||
<Link to={`/manage/reviews/${props.review.id}`}>Edit</Link>
|
||||
}
|
||||
)}
|
||||
</h4>
|
||||
<p>{props.review.content}</p>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user