From 6e03d5bfe879114c942eeff777680bcbd338b118 Mon Sep 17 00:00:00 2001 From: Awais Ansari <79941147+awais-ansari@users.noreply.github.com> Date: Mon, 9 Jan 2023 16:55:19 +0500 Subject: [PATCH] fix: update post delete function to async (#404) --- src/discussions/posts/post/Post.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/discussions/posts/post/Post.jsx b/src/discussions/posts/post/Post.jsx index 2312697d..be20ce94 100644 --- a/src/discussions/posts/post/Post.jsx +++ b/src/discussions/posts/post/Post.jsx @@ -48,8 +48,8 @@ function Post({ } }; - const handleDeleteConfirmation = () => { - dispatch(removeThread(post.id)); + const handleDeleteConfirmation = async () => { + await dispatch(removeThread(post.id)); history.push({ pathname: '.', search: enableInContextSidebar && '?inContextSidebar',