cleaning console logs
This commit is contained in:
@@ -328,7 +328,15 @@ function StreamRoom({
|
||||
}
|
||||
|
||||
// TODO: p1 : destroy peers on load
|
||||
return () => {};
|
||||
// ! remove ws handlers so that the same channels don't get triggered twice when I retune into this line
|
||||
return () => {
|
||||
$ws.removeListener(
|
||||
`${ServerResponseChannels.RTC_RECEIVING_ANSWER_RESPONSE_PREFIX}:${lineId}`
|
||||
);
|
||||
$ws.removeListener(
|
||||
`${ServerResponseChannels.RTC_NEW_USER_JOINED_RESPONSE_PREFIX}:${lineId}`
|
||||
);
|
||||
};
|
||||
}, [userDetails, setUserPeers]);
|
||||
|
||||
// calculate diff to clean our userPeerMap to unmount and detroy certain peer connections
|
||||
|
||||
@@ -113,11 +113,6 @@ function useSocketHandler(linesData: MasterLineData[]) {
|
||||
newMap[res.lineId].currentUserMember?.userId.toString() ===
|
||||
res.userId
|
||||
) {
|
||||
console.log(
|
||||
"updated my line member state for this line | is toggle tuned in: ",
|
||||
res.toggledIn
|
||||
);
|
||||
|
||||
newMap[res.lineId].currentUserMember.lastVisitDate = new Date();
|
||||
newMap[res.lineId].currentUserMember.state = res.toggledIn
|
||||
? LineMemberState.TUNED
|
||||
@@ -202,9 +197,6 @@ function useSocketHandler(linesData: MasterLineData[]) {
|
||||
*/
|
||||
useEffect(() => {
|
||||
if (linesData?.length > 0) {
|
||||
console.log("going to make initial connections and create lines map");
|
||||
console.log(linesData);
|
||||
|
||||
setLinesMap((prevMappings) => {
|
||||
// go through the lines from the persistent store
|
||||
|
||||
|
||||
@@ -29,8 +29,7 @@ export default function NirvanaTerminal() {
|
||||
useLineDataProvider();
|
||||
|
||||
useEffect(() => {
|
||||
console.log("change/update in lines map");
|
||||
|
||||
// console.log("change/update in lines map");
|
||||
// console.log(linesMap);
|
||||
}, [linesMap]);
|
||||
|
||||
@@ -59,7 +58,7 @@ export default function NirvanaTerminal() {
|
||||
|
||||
// find the line from the data provider
|
||||
if (linesMap[selectedLineId]) {
|
||||
console.log("looking for selected Line in map for details section");
|
||||
// console.log("looking for selected Line in map for details section");
|
||||
|
||||
const foundSelectedLine = linesMap[selectedLineId];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user