From e30d7abccb23d716b4469cd1415abde69a83d0a4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Chlo=C3=A9=20JACOB?= <chloe.jacob4@etu.unistra.fr>
Date: Mon, 27 Mar 2023 23:15:01 +0200
Subject: [PATCH] =?UTF-8?q?derni=C3=A8res=20corrections?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 src/components/AddComment.tsx | 3 +++
 src/components/Post.tsx       | 1 -
 src/views/AddPostView.tsx     | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/src/components/AddComment.tsx b/src/components/AddComment.tsx
index 823d9a5..e5b1b30 100644
--- a/src/components/AddComment.tsx
+++ b/src/components/AddComment.tsx
@@ -40,6 +40,9 @@ const AddComment = ({ idPost }: commentProps) => {
           onClick={() => {
             dispatch(postNewCommentAsync(comment, idPost));
             setComment('');
+            setTimeout(() => {
+              window.location.reload();
+            }, 700);
           }}
         >
           <div className="bg-gray-500 text-white font-bold h-10 rounded-md flex items-center px-4">{t('actions.publish')}</div>
diff --git a/src/components/Post.tsx b/src/components/Post.tsx
index 0637417..1366cdf 100644
--- a/src/components/Post.tsx
+++ b/src/components/Post.tsx
@@ -57,7 +57,6 @@ const Post = ({ post, postid, username, location, time_post, caption, isLiked, l
       return document.execCommand('copy', true, text);
     }
   }
-  console.log(post)
 
   return <>
   {/* A POST */}
diff --git a/src/views/AddPostView.tsx b/src/views/AddPostView.tsx
index 3cdb318..9824e33 100644
--- a/src/views/AddPostView.tsx
+++ b/src/views/AddPostView.tsx
@@ -90,7 +90,7 @@ const AddPostView = () => {
                 </form>
 
                 {redirect &&
-                <Navigate to={'post/' + post.id} replace={true} />}
+                <Navigate to={'/post/' + post.id} replace={true} />}
             </div>
         </div>
 
-- 
GitLab