Skip to content

Commit 2f3b01c

Browse files
committed
fix: grading settings save button stuck in pending state
1 parent 13c51ce commit 2f3b01c

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

src/grading-settings/GradingSettings.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,13 +81,14 @@ const GradingSettings = ({ courseId }) => {
8181

8282
useEffect(() => {
8383
if (savingStatus) {
84-
setShowSuccessAlert(!showSuccessAlert);
85-
setShowSavePrompt(!showSavePrompt);
84+
setShowSuccessAlert(true);
85+
setShowSavePrompt(false);
86+
setIsQueryPending(false);
87+
8688
setTimeout(() => setShowSuccessAlert(false), 15000);
87-
setIsQueryPending(!isQueryPending);
8889
window.scrollTo({ top: 0, behavior: 'smooth' });
8990
}
90-
}, [savePending]);
91+
}, [savingStatus]);
9192

9293
if (isLoadingDenied) {
9394
return (

0 commit comments

Comments
 (0)