fix: fixed rate limit dialogue for edit contents (#797)

This commit is contained in:
sundasnoreen12
2025-08-05 15:57:40 +05:00
committed by GitHub
parent a0269115b4
commit ec800dd048
2 changed files with 4 additions and 4 deletions

View File

@@ -94,10 +94,10 @@ const CommentEditor = ({
};
useEffect(() => {
if (contentCreationRateLimited) {
if (contentCreationRateLimited && !id) {
openRestrictionDialogue();
}
}, [contentCreationRateLimited]);
}, [contentCreationRateLimited, id]);
const handleCaptchaChange = useCallback((token, setFieldValue) => {
setFieldValue('recaptchaToken', token || '');

View File

@@ -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(