@@ -1,4 +1,4 @@
|
|||||||
import { useState } from 'react'
|
import { useState, useEffect } from 'react'
|
||||||
import { useNavigate } from 'react-router-dom'
|
import { useNavigate } from 'react-router-dom'
|
||||||
import { Card, Form, Input, Button, Tabs, message } from 'antd'
|
import { Card, Form, Input, Button, Tabs, message } from 'antd'
|
||||||
import { UserOutlined, LockOutlined, MailOutlined, MoonOutlined, SunOutlined } from '@ant-design/icons'
|
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 toggleTheme = useThemeStore((s) => s.toggle)
|
||||||
const navigate = useNavigate()
|
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) {
|
async function handleSubmit(values: LoginAccountPayload | LoginEmailPayload) {
|
||||||
setLoading(true)
|
setLoading(true)
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user