李富豪 5 mesi fa
parent
commit
d6e733a293
1 ha cambiato i file con 5 aggiunte e 1 eliminazioni
  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 (