Skip to content

Commit 2196bf8

Browse files
committed
add participant stats
1 parent aff9500 commit 2196bf8

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

sample-apps/react/react-dogfood/components/DevMenu.tsx

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ import { getConnectionString } from '../lib/connectionString';
44

55
export const DevMenu = () => {
66
const call = useCall();
7+
const { useLocalParticipant } = useCallStateHooks();
8+
const localParticipant = useLocalParticipant();
79
return (
810
<ul className="rd__dev-menu">
911
<li className="rd__dev-menu__item">
@@ -107,6 +109,16 @@ export const DevMenu = () => {
107109
Go to Participant Stats
108110
</a>
109111
)}
112+
{call && localParticipant && (
113+
<a
114+
className="rd__link rd__link--faux-button rd__link--align-left"
115+
href={`/stats/${call.cid}?user_id=${call.currentUserId}&user_session_id=${call['unifiedSessionId'] || localParticipant.sessionId}}`}
116+
rel="noreferrer"
117+
target="_blank"
118+
>
119+
Go to {localParticipant?.name || 'User'} Stats
120+
</a>
121+
)}
110122
</ul>
111123
);
112124
};

0 commit comments

Comments
 (0)