Protect against uncheck race condition

This commit is contained in:
Jack Kingsman
2026-03-23 18:27:42 -07:00
parent 7c988ae3d0
commit 36eeeae64d
2 changed files with 28 additions and 1 deletions
@@ -55,6 +55,12 @@ export function SecurityWarningModal({ health }: SecurityWarningModalProps) {
}
}, [shouldWarn]);
useEffect(() => {
if (health?.bots_disabled !== true) {
setBotsDisabledLocally(false);
}
}, [health?.bots_disabled, health?.bots_disabled_source]);
if (!shouldWarn) {
return null;
}