Skip to content

Commit

Permalink
fix(web): await media ready to render queue screen
Browse files Browse the repository at this point in the history
  • Loading branch information
brunocroh committed May 14, 2024
1 parent 367cc2f commit eab8c80
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions apps/web/app/queue/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export default function Page(): JSX.Element {
setSelectedAudioDevice,
selectedVideoDevice,
setSelectedVideoDevice,
ready,
} = useUserMedia(videoRef.current!);

const [me, setMe] = useState(null);
Expand Down Expand Up @@ -67,6 +68,8 @@ export default function Page(): JSX.Element {
socket.emit(inQueue ? "queueExit" : "queueJoin", { id: me });
}, [inQueue, me]);

if (!ready) return;

return (
<main className="flex flex-col h-full">
<Header />
Expand Down

0 comments on commit eab8c80

Please sign in to comment.