hiding things for testing purposes

This commit is contained in:
talksik
2022-05-07 17:51:14 -05:00
parent b16778fa8d
commit 6a7caa920d
2 changed files with 20 additions and 16 deletions
@@ -27,23 +27,24 @@ export default function ProtectedRoute({
!serverLoading !serverLoading
); );
useEffect(() => { // ! REMOVING FOR TESTING MULTIPLE CLIENTS
// on load of this, if we already have jwt tokens in store, // useEffect(() => {
// then try using them with auth check // // on load of this, if we already have jwt tokens in store,
window.electronAPI.store // // then try using them with auth check
.get(STORE_ITEMS.AUTH_SESSION_JWT) // window.electronAPI.store
.then((jwtToken: string) => { // .get(STORE_ITEMS.AUTH_SESSION_JWT)
if (jwtToken) { // .then((jwtToken: string) => {
NirvanaApi._jwtToken = jwtToken; // if (jwtToken) {
setJwtToken(jwtToken); // NirvanaApi._jwtToken = jwtToken;
refetch(); // setJwtToken(jwtToken);
// refetch();
console.log("retrieved jwtToken from storage", jwtToken); // console.log("retrieved jwtToken from storage", jwtToken);
} else { // } else {
console.log("no jwt token in store"); // console.log("no jwt token in store");
} // }
}); // });
}, []); // }, []);
useEffect(() => { useEffect(() => {
console.log("change in jwt token", jwtToken); console.log("change in jwt token", jwtToken);
@@ -326,6 +326,9 @@ function StreamRoom({
); );
}); });
} }
// TODO: p1 : destroy peers on load
return () => {};
}, [userDetails, setUserPeers]); }, [userDetails, setUserPeers]);
// calculate diff to clean our userPeerMap to unmount and detroy certain peer connections // calculate diff to clean our userPeerMap to unmount and detroy certain peer connections