From 6d6c61dec2d86846444c6ef789bd76321f385dd2 Mon Sep 17 00:00:00 2001 From: Awais Ansari <79941147+awais-ansari@users.noreply.github.com> Date: Wed, 10 May 2023 15:01:28 +0500 Subject: [PATCH] fix: direct link thread no found issue (#516) --- src/discussions/post-comments/PostCommentsView.jsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/discussions/post-comments/PostCommentsView.jsx b/src/discussions/post-comments/PostCommentsView.jsx index da5c2202..8cfebbf0 100644 --- a/src/discussions/post-comments/PostCommentsView.jsx +++ b/src/discussions/post-comments/PostCommentsView.jsx @@ -39,14 +39,14 @@ const PostCommentsView = () => { const { closed, id: threadId, type } = usePost(postId); useEffect(() => { - if (!postId) { + if (!threadId) { submitDispatch(fetchThread(postId, courseId, true)); } return () => { setAddingResponse(false); }; - }, [postId, courseId]); + }, [postId]); const handleAddResponseButton = useCallback(() => { setAddingResponse(true);