Skip to content

Commit

Permalink
fixes error/warning when the call is left in expo
Browse files Browse the repository at this point in the history
  • Loading branch information
kristian-mkd committed Dec 26, 2024
1 parent c1cae0d commit 9a40fe4
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion sample-apps/react-native/expo-video-sample/app/meeting.tsx
Original file line number Diff line number Diff line change
@@ -1,14 +1,20 @@
import { StreamCall, useCalls } from '@stream-io/video-react-native-sdk';
import { router } from 'expo-router';
import { MeetingUI } from '../components/MeetingUI';
import { useEffect } from 'react';

export default function JoinMeetingScreen() {
const calls = useCalls().filter((c) => !c.ringing);

const firstCall = calls[0];

useEffect(() => {
if (!firstCall) {
router.back();
}
}, [firstCall]);

if (!firstCall) {
router.back();
return null;
}

Expand Down

0 comments on commit 9a40fe4

Please sign in to comment.