fix: add missing turnstile setup (close #1015)

This commit is contained in:
JustSong 2024-03-10 18:15:24 +08:00
parent 12440874b0
commit b09f979b80
2 changed files with 12 additions and 1 deletions

View File

@ -16,6 +16,17 @@ const PasswordResetForm = () => {
const [disableButton, setDisableButton] = useState(false);
const [countdown, setCountdown] = useState(30);
useEffect(() => {
let status = localStorage.getItem('status');
if (status) {
status = JSON.parse(status);
if (status.turnstile_check) {
setTurnstileEnabled(true);
setTurnstileSiteKey(status.turnstile_site_key);
}
}
}, []);
useEffect(() => {
let countdownInterval = null;
if (disableButton && countdown > 0) {