add link profil in post
continuous-integration/drone/push Build encountered an error Details

master
Bastien OLLIER 2 years ago
parent 534f8b77a2
commit 8e1e490dd7

@ -78,7 +78,6 @@ const Navbar = () => {
window.location = "/"; window.location = "/";
} }
console.log("uid:", uid);
return ( return (
<div> <div>
{uid ? ( {uid ? (

@ -10,7 +10,7 @@ const Notif = ({notification} ) => {
const MessageNotif = (notification) =>{ const MessageNotif = (notification) =>{
if(notification.typeNotif == 'like') { if(notification.typeNotif == 'like') {
return "a like"; return "a like votre post";
} }
else if(notification.typeNotif == 'commente') { else if(notification.typeNotif == 'commente') {
return "a commenter votre post"; return "a commenter votre post";

@ -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>

@ -8,13 +8,6 @@ const Trends = () => {
const [setLoadNotif] = useState(true); const [setLoadNotif] = useState(true);
const userData = useSelector((state) => state.user.user); const userData = useSelector((state) => state.user.user);
const loadMore = () => {
if (window.innerHeight + document.documentElement.scrollTop + 1 > document.scrollingElement.scrollHeight){
setLoadNotif(true);
}
}
console.log("idUser: ",userData._id);
return ( return (
<div id={'listeNotif'}> <div id={'listeNotif'}>
<Navbar /> <Navbar />

Loading…
Cancel
Save