reglage bug

master
Darius BERTRAND 2 years ago
parent 9a0117fb1d
commit ac42bac4e6

@ -19,7 +19,7 @@ const DisplayPostLikeProfil = () => {
return (
<div>
<ul>
{!isEmpty(postsData[0]) &&
{!isEmpty(postsData) &&
postsData.filter(post => post.likers.includes(uid))
.map((post) => {
return <Post post={post} key={post._id}/>

@ -22,7 +22,7 @@ const NouveauDisplayPosts = () => {
return (
<div>
<ul>
{!isEmpty(postsData[0]) &&
{!isEmpty(postsData) &&
postsData.map((post) => {
if(post.postedId === uid){
return <Post post={post} key={post._id}/>

@ -34,7 +34,7 @@ const DisplayPosts = ( {type} ) => {
return (
<div>
<ul>
{!isEmpty(postsData) && !isEmpty(postsData[0]) &&
{!isEmpty(postsData) && !isEmpty(postsData) &&
postsData.map((post) => {
return <Post post={post} key={post._id}/>
})}

@ -47,7 +47,7 @@ const PostNouvelleAffichage = ( { post } ) => {
useEffect(() => {
try {
!isEmpty(usersData[0]) && setIsLoading(false)
!isEmpty(usersData) && setIsLoading(false)
}
catch (error){

@ -55,7 +55,7 @@ const SuggestFriends = () => {
setFriends(array);
}
if(change && !isEmpty(usersData[0]) && userData!=null){
if(change && !isEmpty(usersData) && userData!=null){
if(userData.followers.length === 0){
stateTopFollowers();
}else{

@ -20,7 +20,7 @@ const postSchema = new mongoose.Schema(
likers: {
type: [String],
required: true
},-
},
tags: {
type: [String],
required: true

Loading…
Cancel
Save