fix: fixed rate limit dialogue for edit contents (#797)
This commit is contained in:
@@ -94,10 +94,10 @@ const CommentEditor = ({
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
if (contentCreationRateLimited) {
|
||||
if (contentCreationRateLimited && !id) {
|
||||
openRestrictionDialogue();
|
||||
}
|
||||
}, [contentCreationRateLimited]);
|
||||
}, [contentCreationRateLimited, id]);
|
||||
|
||||
const handleCaptchaChange = useCallback((token, setFieldValue) => {
|
||||
setFieldValue('recaptchaToken', token || '');
|
||||
|
||||
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user