fix: update post delete function to async (#404)

This commit is contained in:
Awais Ansari
2023-01-09 16:55:19 +05:00
committed by GitHub
parent fd4dbef2e0
commit 6e03d5bfe8

View File

@@ -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',