Skip to content

Commit

Permalink
feat(example-app): usage of reason param in onLeave callback prop…
Browse files Browse the repository at this point in the history
… given to `HMSPrebuilt` component
  • Loading branch information
stanwolverine committed Oct 25, 2023
1 parent acdc2fe commit 38433f8
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
useRoute,
} from '@react-navigation/native';
import { HMSPrebuilt } from '@100mslive/react-native-room-kit';
import type { HMSPrebuiltProps } from '@100mslive/react-native-room-kit';
import type { HMSPrebuiltProps, OnLeaveHandler } from '@100mslive/react-native-room-kit';

import { AppStackParamList } from '../../navigator';

Expand All @@ -23,7 +23,8 @@ export const HMSPrebuiltScreen = () => {
const isScreenFocused = useIsFocused();

// function to be called when meeting is ended
const handleMeetingLeave = useCallback(async () => {
const handleMeetingLeave: OnLeaveHandler = useCallback(async (reason) => {
console.log(':: reason > ', reason);
if (Platform.OS === 'android') {
await VIForegroundService.getInstance().stopService();
}
Expand Down

0 comments on commit 38433f8

Please sign in to comment.