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
);
useEffect(() => {
// on load of this, if we already have jwt tokens in store,
// then try using them with auth check
window.electronAPI.store
.get(STORE_ITEMS.AUTH_SESSION_JWT)
.then((jwtToken: string) => {
if (jwtToken) {
NirvanaApi._jwtToken = jwtToken;
setJwtToken(jwtToken);
refetch();
// ! REMOVING FOR TESTING MULTIPLE CLIENTS
// useEffect(() => {
// // on load of this, if we already have jwt tokens in store,
// // then try using them with auth check
// window.electronAPI.store
// .get(STORE_ITEMS.AUTH_SESSION_JWT)
// .then((jwtToken: string) => {
// if (jwtToken) {
// NirvanaApi._jwtToken = jwtToken;
// setJwtToken(jwtToken);
// refetch();
console.log("retrieved jwtToken from storage", jwtToken);
} else {
console.log("no jwt token in store");
}
});
}, []);
// console.log("retrieved jwtToken from storage", jwtToken);
// } else {
// console.log("no jwt token in store");
// }
// });
// }, []);
useEffect(() => {
console.log("change in jwt token", jwtToken);
@@ -326,6 +326,9 @@ function StreamRoom({
);
});
}
// TODO: p1 : destroy peers on load
return () => {};
}, [userDetails, setUserPeers]);
// calculate diff to clean our userPeerMap to unmount and detroy certain peer connections