diff --git a/Site Web/client/src/components/MiniProfil.js b/Site Web/client/src/components/MiniProfil.js index 47776f58..bd6549bd 100644 --- a/Site Web/client/src/components/MiniProfil.js +++ b/Site Web/client/src/components/MiniProfil.js @@ -22,8 +22,6 @@ const MiniProfil = ({uid} ) => { return

Loading...

; } - - return (
diff --git a/Site Web/client/src/components/Post/NouveauDisplayPosts.js b/Site Web/client/src/components/Post/NouveauDisplayPosts.js index a95c213d..8674ebad 100644 --- a/Site Web/client/src/components/Post/NouveauDisplayPosts.js +++ b/Site Web/client/src/components/Post/NouveauDisplayPosts.js @@ -26,15 +26,15 @@ const NouveauDisplayPosts = () => { return () => window.removeEventListener('scroll',loadMore); }, [loadPost,dispatch,count]) - if (!loadPost) { + if (loadPost || (postsData === null || isEmpty(postsData)) ) { return

Loading...

; } + return (
    - {!isEmpty(postsData[0]) && - postsData.map((post) => { + { postsData === null && !isEmpty(postsData[0]) && postsData.map((post) => { return })}
diff --git a/Site Web/client/src/components/Post/PostNouvelleAffichage.js b/Site Web/client/src/components/Post/PostNouvelleAffichage.js index 4e4d8d0a..64e5c3a0 100644 --- a/Site Web/client/src/components/Post/PostNouvelleAffichage.js +++ b/Site Web/client/src/components/Post/PostNouvelleAffichage.js @@ -49,6 +49,10 @@ const PostNouvelleAffichage = ( { post } ) => { !isEmpty(usersData[0]) && setIsLoading(false) }) + if(!isLoading){ + return

; + } + return (
  • {isLoading ? (