Fix can not autoload in production mode bug

This commit is contained in:
2024-01-15 15:57:48 +08:00
parent bcf29f74ef
commit 6d08e1a8e8
24 changed files with 36 additions and 57 deletions

View File

@@ -7,7 +7,6 @@ import {
SYSTEM_INVALID_CAPTCHA_CODE,
SYSTEM_MATCH_SENSITIVE_WORD
} from '@/constants/common.constants'
import { useUpdatedEffect } from '@/util/hooks'
import { getLoginStatus, setToken } from '@/util/auth'
import { r_auth_register, r_auth_resend } from '@/services/auth'
import FitCenter from '@/components/common/FitCenter'
@@ -32,7 +31,7 @@ const SignUp = () => {
const [isSending, setIsSending] = useState(false)
const [captchaCode, setCaptchaCode] = useState('')
useUpdatedEffect(() => {
useEffect(() => {
if (!isSigningUp) {
setCaptchaCode('')
turnstileRef.current?.reset()
@@ -40,7 +39,7 @@ const SignUp = () => {
}
}, [isSigningUp])
useUpdatedEffect(() => {
useEffect(() => {
if (location.pathname !== '/register') {
return
}