fix: direct link thread no found issue (#516)

This commit is contained in:
Awais Ansari
2023-05-10 15:01:28 +05:00
committed by GitHub
parent 84e18b9ed6
commit 6d6c61dec2

View File

@@ -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);