diff --git a/src/discussions/post-comments/comments/comment/CommentEditor.jsx b/src/discussions/post-comments/comments/comment/CommentEditor.jsx index ecd7c59a..94d045bc 100644 --- a/src/discussions/post-comments/comments/comment/CommentEditor.jsx +++ b/src/discussions/post-comments/comments/comment/CommentEditor.jsx @@ -94,10 +94,10 @@ const CommentEditor = ({ }; useEffect(() => { - if (contentCreationRateLimited) { + if (contentCreationRateLimited && !id) { openRestrictionDialogue(); } - }, [contentCreationRateLimited]); + }, [contentCreationRateLimited, id]); const handleCaptchaChange = useCallback((token, setFieldValue) => { setFieldValue('recaptchaToken', token || ''); diff --git a/src/discussions/posts/post-editor/PostEditor.jsx b/src/discussions/posts/post-editor/PostEditor.jsx index 0f3d8b2b..87fa21cb 100644 --- a/src/discussions/posts/post-editor/PostEditor.jsx +++ b/src/discussions/posts/post-editor/PostEditor.jsx @@ -177,10 +177,10 @@ const PostEditor = ({ }, [postId, topicId, post?.author, category, editExisting, commentsPagePath, location]); useEffect(() => { - if (contentCreationRateLimited) { + if (contentCreationRateLimited && !postId) { openRestrictionDialogue(); } - }, [contentCreationRateLimited]); + }, [contentCreationRateLimited, postId]); // null stands for no cohort restriction ("All learners" option) const selectedCohort = useCallback(