修复编译问题 & 将人机验证组件动态化

This commit is contained in:
2025-12-20 18:05:46 +08:00
parent c979765a77
commit adc8195d53
8 changed files with 13 additions and 73 deletions

View File

@@ -15,8 +15,7 @@ import {toast} from 'sonner'
import {useRouter} from 'next/navigation'
import {login, LoginMode} from '@/actions/auth'
import {useProfileStore} from '@/components/stores/profile'
import SendMsg from '@/components/send-msg'
import '@cap.js/widget'
import dynamic from 'next/dynamic'
const smsSchema = zod.object({
username: zod.string().length(11, '请输入正确的手机号码'),
@@ -211,3 +210,5 @@ function SendMsgByUsername() {
const phone = useWatch({control, name: 'username'})
return <SendMsg phone={phone}/>
}
const SendMsg = dynamic(() => import('@/components/send-msg'), {ssr: false})