Skip to content

Commit

Permalink
fix(WebexMeeting): update to only use useMeetingDestination
Browse files Browse the repository at this point in the history
  • Loading branch information
lalli-flores committed Jan 29, 2020
1 parent 49b5559 commit 4b563fe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
6 changes: 2 additions & 4 deletions src/components/WebexMeeting/WebexMeeting.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React, {Fragment} from 'react';
import PropTypes from 'prop-types';
import {Spinner} from '@momentum-ui/react';

import {useMeeting} from '../hooks';
import {useMeetingDestination} from '../hooks';

import {WebexInMeeting, WebexInterstitialMeeting, WebexMeetingControl, WebexMeetingControls} from '..';

Expand All @@ -15,9 +15,7 @@ import './WebexMeeting.css';
* @returns {object} JSX of the component
*/
export default function WebexMeeting({meetingDestination, controls}) {
const {ID} = useMeeting(null, meetingDestination);
// Subscribe to meeting updates after meeting creation
const {remoteVideo} = useMeeting(ID);
const {ID, remoteVideo} = useMeetingDestination(meetingDestination);
const isActive = remoteVideo !== null;
const meetingControls = controls(isActive).map((key) => <WebexMeetingControl key={key} type={key} />);

Expand Down
2 changes: 1 addition & 1 deletion src/components/WebexMeeting/WebexMeeting.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import React from 'react';

import WebexMeeting from './WebexMeeting';

jest.mock('../hooks/useMeeting');
jest.mock('../hooks/useMeetingDestination');

describe('Webex Meeting component', () => {
describe('snapshot', () => {
Expand Down

0 comments on commit 4b563fe

Please sign in to comment.