You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

HangupContainerButtons.tsx 740B

123456789101112131415161718192021
  1. import React from 'react';
  2. import { useSelector } from 'react-redux';
  3. import { IReduxState } from '../../../app/types';
  4. import { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';
  5. import HangupButton from '../HangupButton';
  6. import HangupMenuButton from './HangupMenuButton';
  7. const HangupContainerButtons = (props: AbstractButtonProps) => {
  8. const { conference } = useSelector((state: IReduxState) => state['features/base/conference']);
  9. const endConferenceSupported = conference?.isEndConferenceSupported();
  10. return endConferenceSupported
  11. // @ts-ignore
  12. ? <HangupMenuButton { ...props } />
  13. : <HangupButton { ...props } />;
  14. };
  15. export default HangupContainerButtons;