李富豪 5 kuukautta sitten
vanhempi
commit
d6e733a293
1 muutettua tiedostoa jossa 5 lisäystä ja 1 poistoa
  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 (