李富豪 5 months ago
parent
commit
d6e733a293
1 changed files with 5 additions and 1 deletions
  1. 5 1
      app/components/DeekSeekHome.tsx

+ 5 - 1
app/components/DeekSeekHome.tsx

@@ -43,7 +43,11 @@ const DeekSeek: React.FC = () => {
 
     React.useEffect(() => {
         chatStore.clearSessions();
-        init()
+        const userInfo = localStorage.getItem('userInfo');
+
+        if (userInfo) {
+            init();
+        }
     }, []);
 
     return (