@@ -1,4 +1,4 @@
|
||||
import { useState } from 'react'
|
||||
import { useState, useEffect } from 'react'
|
||||
import { useNavigate } from 'react-router-dom'
|
||||
import { Card, Form, Input, Button, Tabs, message } from 'antd'
|
||||
import { UserOutlined, LockOutlined, MailOutlined, MoonOutlined, SunOutlined } from '@ant-design/icons'
|
||||
@@ -17,6 +17,22 @@ export default function LoginPage() {
|
||||
const toggleTheme = useThemeStore((s) => s.toggle)
|
||||
const navigate = useNavigate()
|
||||
|
||||
useEffect(() => {
|
||||
const htmlOverflow = document.documentElement.style.overflow
|
||||
const bodyOverflow = document.body.style.overflow
|
||||
const bodyTouchAction = document.body.style.touchAction
|
||||
|
||||
document.documentElement.style.overflow = 'hidden'
|
||||
document.body.style.overflow = 'hidden'
|
||||
document.body.style.touchAction = 'none'
|
||||
|
||||
return () => {
|
||||
document.documentElement.style.overflow = htmlOverflow
|
||||
document.body.style.overflow = bodyOverflow
|
||||
document.body.style.touchAction = bodyTouchAction
|
||||
}
|
||||
}, [])
|
||||
|
||||
async function handleSubmit(values: LoginAccountPayload | LoginEmailPayload) {
|
||||
setLoading(true)
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user