-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathPost copy.js
46 lines (40 loc) · 1.54 KB
/
Post copy.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
import React, { forwardRef } from 'react';
import './Post.css';
import VerifiedUserIcon from '@mui/icons-material/VerifiedUser';
import ChatBubbleOutlineIcon from '@mui/icons-material/ChatBubbleOutline';
import RepeatIcon from '@mui/icons-material/Repeat';
import FavoriteBorderIcon from '@mui/icons-material/FavoriteBorder';
import PublishIcon from '@mui/icons-material/Publish';
import { Avatar } from '@mui/material';
const Post = forwardRef(({displayName,
username,
verified,
text,
image,
avatar, ref}) => {
return <div className = "post" ref = {ref}>
<div className = "post__avatar">
<Avatar src = {avatar} />
</div>
<div className = "post__body">
<div className = "post__header">
<div className = "post__headerText">
<h3>{displayName} <span className = "post__headerSpecial">
{verified &&<VerifiedUserIcon className = "post__badge"/> }@{username}
</span></h3>
</div>
<div className = "post__headerDescription">
<p> {text}</p>
</div>
</div>
<img src = {image} alt = ""></img>
<div className = "post__footer">
<ChatBubbleOutlineIcon fontSize = "small" />
<RepeatIcon fontSize = "small" />
<FavoriteBorderIcon fontSize = "size" />
<PublishIcon fonstSize = "small" />
</div>
</div>
</div>;
})
export default Post;