mirror of
https://github.com/astuto/astuto.git
synced 2025-12-16 11:47:56 +01:00
Basic comments visualisation
This commit is contained in:
36
app/javascript/components/Comments/Comment.tsx
Normal file
36
app/javascript/components/Comments/Comment.tsx
Normal file
@@ -0,0 +1,36 @@
|
||||
import * as React from 'react';
|
||||
|
||||
import { MutedText } from '../shared/CustomTexts';
|
||||
|
||||
interface Props {
|
||||
id: number;
|
||||
body: string;
|
||||
parentId: number;
|
||||
userFullName: string;
|
||||
updatedAt: string;
|
||||
|
||||
level: number;
|
||||
}
|
||||
|
||||
const Comment = ({
|
||||
id,
|
||||
body,
|
||||
parentId,
|
||||
userFullName,
|
||||
updatedAt,
|
||||
|
||||
level,
|
||||
}: Props) => (
|
||||
<div className="comment">
|
||||
<div className="commentHeader">
|
||||
<span className="commentAuthor">{userFullName}</span>
|
||||
</div>
|
||||
<p className="commentBody">{body}</p>
|
||||
<div className="commentFooter">
|
||||
<a href="#">Reply</a>
|
||||
<MutedText>{updatedAt}</MutedText>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
|
||||
export default Comment;
|
||||
Reference in New Issue
Block a user