fix: double navigation on login causing 404
This commit is contained in:
@@ -18,8 +18,7 @@ export default function LoginPage() {
|
||||
setLoading(true)
|
||||
try {
|
||||
await login(username, password)
|
||||
toast.success('登录成功')
|
||||
navigate('/dashboard', { replace: true })
|
||||
// RedirectIfAuth handles navigation automatically
|
||||
} catch (err: any) {
|
||||
const status = err?.response?.status
|
||||
const detail = err?.response?.data?.detail ?? '登录失败'
|
||||
|
||||
Reference in New Issue
Block a user