diff --git a/client/src/contexts/SocketContext.tsx b/client/src/contexts/SocketContext.tsx index 5b46ce064..a51fdf4ad 100644 --- a/client/src/contexts/SocketContext.tsx +++ b/client/src/contexts/SocketContext.tsx @@ -35,10 +35,10 @@ export const SocketProvider = ({ children }: { children: React.ReactNode }) => { setMounted(true); } + if (!mounted) { initializeSocket(); } - return () => { console.log("[LOG]: Cleaning up intializeSocket useEffect"); }; diff --git a/client/src/services/store.ts b/client/src/services/store.ts index 5ae4ed104..9b5321256 100644 --- a/client/src/services/store.ts +++ b/client/src/services/store.ts @@ -1,8 +1,8 @@ import { User, createUserWithEmailAndPassword, onAuthStateChanged, signInWithEmailAndPassword, signOut } from 'firebase/auth' import { Store } from 'pullstate' import { auth, app } from '../configs/firebaseConfig' - - +import { FirebaseError } from 'firebase/app'; +import { useUser } from '../contexts/UserContext'; interface AuthStoreInterface { isLoggedin: boolean,