problemme regler profil

master
Bastien OLLIER 2 years ago
parent 78340277f2
commit fdddde0460

@ -22,8 +22,6 @@ const MiniProfil = ({uid} ) => {
return <p>Loading...</p>; return <p>Loading...</p>;
} }
return ( return (
<div className="ListReco"> <div className="ListReco">
<div className="UtiReco"> <div className="UtiReco">

@ -26,15 +26,15 @@ const NouveauDisplayPosts = () => {
return () => window.removeEventListener('scroll',loadMore); return () => window.removeEventListener('scroll',loadMore);
}, [loadPost,dispatch,count]) }, [loadPost,dispatch,count])
if (!loadPost) { if (loadPost || (postsData === null || isEmpty(postsData)) ) {
return <p>Loading...</p>; return <p>Loading...</p>;
} }
return ( return (
<div> <div>
<ul> <ul>
{!isEmpty(postsData[0]) && { postsData === null && !isEmpty(postsData[0]) && postsData.map((post) => {
postsData.map((post) => {
return <Post post={post} key={post._id}/> return <Post post={post} key={post._id}/>
})} })}
</ul> </ul>

@ -49,6 +49,10 @@ const PostNouvelleAffichage = ( { post } ) => {
!isEmpty(usersData[0]) && setIsLoading(false) !isEmpty(usersData[0]) && setIsLoading(false)
}) })
if(!isLoading){
return <p></p>;
}
return ( return (
<li className='PostesProfilConteneur' key={post._id}> <li className='PostesProfilConteneur' key={post._id}>
{isLoading ? ( {isLoading ? (

Loading…
Cancel
Save