diff --git a/src/components/AddComment.tsx b/src/components/AddComment.tsx index 823d9a589a0a471cb24638f5bc9732f62f889dc2..e5b1b30a84441521d1f1e5cf8fb6ecee7912c629 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 0637417ff24f1375a2795b431a49445350b19710..1366cdf0797930322e287a7cc5981b6f9caabac8 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 3cdb318749c914274a373087c687f8e1cc0de658..9824e33ccfdb6830722051bd8321806ad9c1fb6f 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>