diff --git a/Site Web/client/src/components/Post/DisplayPost/NouveauDisplayPosts.js b/Site Web/client/src/components/Post/DisplayPost/NouveauDisplayPosts.js
index d928176f..a5555d9d 100644
--- a/Site Web/client/src/components/Post/DisplayPost/NouveauDisplayPosts.js
+++ b/Site Web/client/src/components/Post/DisplayPost/NouveauDisplayPosts.js
@@ -17,19 +17,24 @@ const NouveauDisplayPosts = () => {
if (!postsData) {
return
Loading...
;
}
+ try{
+ return (
+
+
+ {!isEmpty(postsData[0]) &&
+ postsData.map((post) => {
+ if(post.postedId === uid){
+ return
+ }
+ })}
+
+
+ );
+ }
+ catch (error){
+ return Loading...
;
- return (
-
-
- {!isEmpty(postsData[0]) &&
- postsData.map((post) => {
- if(post.postedId === uid){
- return
- }
- })}
-
-
- );
+ }
};
export default NouveauDisplayPosts;
\ No newline at end of file
diff --git a/Site Web/client/src/components/Post/PostNouvelleAffichage.js b/Site Web/client/src/components/Post/PostNouvelleAffichage.js
index 2889b0b6..003b58fe 100644
--- a/Site Web/client/src/components/Post/PostNouvelleAffichage.js
+++ b/Site Web/client/src/components/Post/PostNouvelleAffichage.js
@@ -52,38 +52,42 @@ const PostNouvelleAffichage = ( { post } ) => {
if(!isLoading){
return ;
}
-
- return (
-
- {isLoading ? (
-
- ):(
- <>
-
-
-
{dateParser(post.createdAt)}
-
-
-
-
-
- {/*
*/}
- {post.likers.length}
-
-
-
-
- {comments && }
- >
- ) }
-
- );
+ try {
+ return (
+
+ {isLoading ? (
+
+ ) : (
+ <>
+
+
+
{dateParser(post.createdAt)}
+
+
+
+
+
+ {/*
*/}
+ {post.likers.length}
+
+
+
+
+ {comments && }
+ >
+ )}
+
+ );
+ }
+ catch (error){
+ return Loading...
;
+ }
};