Move conference call debugger to its own class

This commit is contained in:
Robert Long
2021-08-05 13:44:59 -07:00
parent ed427572e7
commit 274b3336c9
3 changed files with 406 additions and 383 deletions

View File

@@ -40,19 +40,19 @@ function sortEntries(a, b) {
}
export function DevTools({ manager }) {
const [debugState, setDebugState] = useState(manager.debugState);
const [debugState, setDebugState] = useState(manager.callDebugger.debugState);
const [selectedEvent, setSelectedEvent] = useState();
const [activeTab, setActiveTab] = useState("users");
useEffect(() => {
function onRoomDebug() {
setDebugState({ ...manager.debugState });
setDebugState({ ...manager.callDebugger.debugState });
}
manager.on("debug", onRoomDebug);
manager.callDebugger.on("debug", onRoomDebug);
return () => {
manager.removeListener("debug", onRoomDebug);
manager.callDebugger.removeListener("debug", onRoomDebug);
};
}, [manager]);