reglage bug

master
Darius BERTRAND 2 years ago
parent 9a0117fb1d
commit ac42bac4e6

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

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

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

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

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

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

Loading…
Cancel
Save