Skip to content

Commit

Permalink
fix(rn-dogfood): unnecessary rerender on call leave
Browse files Browse the repository at this point in the history
  • Loading branch information
santhoshvai committed Dec 4, 2023
1 parent ee77373 commit b4e8848
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions sample-apps/react-native/dogfood/src/components/MeetingUI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,9 @@ export const MeetingUI = ({ callId, navigation, route }: Props) => {
const onHangupCallHandler = async () => {
setShow('loading');
try {
if (callingState === CallingState.LEFT) {
return;
if (callingState !== CallingState.LEFT) {
await call?.leave();
}
await call?.leave();
setShow('lobby');
navigation.goBack();
} catch (error) {
if (error instanceof Error) {
Expand Down

0 comments on commit b4e8848

Please sign in to comment.