From 6a7caa920d2c250b47816ce9ab058072cfd161fa Mon Sep 17 00:00:00 2001 From: talksik Date: Sat, 7 May 2022 17:51:14 -0500 Subject: [PATCH] hiding things for testing purposes --- .../src/components/ProtectedRoute/index.tsx | 33 ++++++++++--------- .../components/lines/lineRow.tsx/index.tsx | 3 ++ 2 files changed, 20 insertions(+), 16 deletions(-) diff --git a/packages/desktop/src/components/ProtectedRoute/index.tsx b/packages/desktop/src/components/ProtectedRoute/index.tsx index 1733791..95daf04 100644 --- a/packages/desktop/src/components/ProtectedRoute/index.tsx +++ b/packages/desktop/src/components/ProtectedRoute/index.tsx @@ -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); diff --git a/packages/desktop/src/components/lines/lineRow.tsx/index.tsx b/packages/desktop/src/components/lines/lineRow.tsx/index.tsx index 928e662..a73d2a3 100644 --- a/packages/desktop/src/components/lines/lineRow.tsx/index.tsx +++ b/packages/desktop/src/components/lines/lineRow.tsx/index.tsx @@ -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