mirror of
https://github.com/songquanpeng/one-api.git
synced 2025-10-20 02:34:02 +00:00
fix: add missing turnstile setup (close #1015)
This commit is contained in:
@@ -16,6 +16,17 @@ const PasswordResetForm = () => {
|
|||||||
const [disableButton, setDisableButton] = useState(false);
|
const [disableButton, setDisableButton] = useState(false);
|
||||||
const [countdown, setCountdown] = useState(30);
|
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(() => {
|
useEffect(() => {
|
||||||
let countdownInterval = null;
|
let countdownInterval = null;
|
||||||
if (disableButton && countdown > 0) {
|
if (disableButton && countdown > 0) {
|
||||||
|
Reference in New Issue
Block a user