|
|
@ -6,6 +6,7 @@ import { dateParser, isEmpty } from '../Utils';
|
|
|
|
import ButtonLike from './ButtonLike';
|
|
|
|
import ButtonLike from './ButtonLike';
|
|
|
|
import Comment from './Comment';
|
|
|
|
import Comment from './Comment';
|
|
|
|
import Commentaire from '../../assets/img/commentaire.png';
|
|
|
|
import Commentaire from '../../assets/img/commentaire.png';
|
|
|
|
|
|
|
|
import MiniProfil from "../MiniProfil";
|
|
|
|
|
|
|
|
|
|
|
|
const LinkPreview = ({ link }) => {
|
|
|
|
const LinkPreview = ({ link }) => {
|
|
|
|
const [preview, setPreview] = useState({ image: '', title: '', description: '' });
|
|
|
|
const [preview, setPreview] = useState({ image: '', title: '', description: '' });
|
|
|
@ -63,24 +64,8 @@ const Post = ( { post } ) => {
|
|
|
|
<div id="postContenu">
|
|
|
|
<div id="postContenu">
|
|
|
|
<div id="hautPoste">
|
|
|
|
<div id="hautPoste">
|
|
|
|
<div id="cadreInfoPoste">
|
|
|
|
<div id="cadreInfoPoste">
|
|
|
|
<img id="PhotoProfile" alt="" src={
|
|
|
|
<MiniProfil uid={post.postedId}/>
|
|
|
|
!isEmpty(usersData[0]) &&
|
|
|
|
{post.postedId !== userData._id && (<FollowHandler idToFollow={post.postedId} type={'suggest'}/>)}
|
|
|
|
usersData.map((user) => {
|
|
|
|
|
|
|
|
if (user._id === post.postedId) return user.picture;
|
|
|
|
|
|
|
|
else return null;
|
|
|
|
|
|
|
|
}).join('')
|
|
|
|
|
|
|
|
}/>
|
|
|
|
|
|
|
|
<h6 id="NomProfile">
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
!isEmpty(usersData[0]) &&
|
|
|
|
|
|
|
|
usersData.map((user) => {
|
|
|
|
|
|
|
|
if(user._id === post.postedId) return user.pseudo;
|
|
|
|
|
|
|
|
else return null;
|
|
|
|
|
|
|
|
}).join('')
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</h6>
|
|
|
|
|
|
|
|
{post.postedId !== userData._id &&
|
|
|
|
|
|
|
|
(<FollowHandler idToFollow={post.postedId} type={'suggest'}/>)}
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div>{dateParser(post.createdAt)}</div>
|
|
|
|
<div>{dateParser(post.createdAt)}</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|