mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2025-12-30 11:22:31 +00:00
Configures what buttons can be visible inside Toolbox and OverflowMenu, based on priority and config overrides, just like web does.
22 lines
740 B
TypeScript
22 lines
740 B
TypeScript
import React from 'react';
|
|
import { useSelector } from 'react-redux';
|
|
|
|
import { IReduxState } from '../../../app/types';
|
|
import { IProps as AbstractButtonProps } from '../../../base/toolbox/components/AbstractButton';
|
|
import HangupButton from '../HangupButton';
|
|
|
|
import HangupMenuButton from './HangupMenuButton';
|
|
|
|
const HangupContainerButtons = (props: AbstractButtonProps) => {
|
|
const { conference } = useSelector((state: IReduxState) => state['features/base/conference']);
|
|
const endConferenceSupported = conference?.isEndConferenceSupported();
|
|
|
|
return endConferenceSupported
|
|
|
|
// @ts-ignore
|
|
? <HangupMenuButton { ...props } />
|
|
: <HangupButton { ...props } />;
|
|
};
|
|
|
|
export default HangupContainerButtons;
|