diff --git a/src/feature/auth/Login.tsx b/src/feature/auth/Login.tsx
index 8043007..1ae6c85 100644
--- a/src/feature/auth/Login.tsx
+++ b/src/feature/auth/Login.tsx
@@ -3,7 +3,7 @@
 import { NavLink, useNavigate } from 'react-router';
 import { useAppDispatch, useAppSelector } from '../../store/hooks';
 import { loginUser } from './authSlice';
-import { useEffect, useRef } from 'react';
+import { useEffect } from 'react';
 import useMessage from 'antd/es/message/useMessage';
 
 // 定义 Form 表单的字段类型
@@ -17,16 +17,17 @@
     const dispatch = useAppDispatch();
     const auth = useAppSelector(state => (state.auth));
     const [messageApi, Message] = useMessage()
-    const nav = useRef(useNavigate())
+    const nav = useNavigate()
 
     useEffect(() => {
         if (auth.isAuth) {
-            nav.current('/');
+            nav('/', { replace: true });
         }
         if (!auth.loading && auth.error) {
             messageApi.error(auth.error);
         }
     }, [auth, messageApi, nav])
+
     // 给 onFinish 参数添加类型
     const onFinish = async (values: FormValues) => {
         try {
