Files
jitsi-meet/react/features/embed-meeting/hooks.ts
Hristo Terezov 6d9bbe0376 fix(MainToolbar): replace hidden buttons.
Currently if a button in the main toolbar is not visible, the button is
not replaced by another button from the overflow menu.
2024-06-14 10:18:00 +03:00

26 lines
616 B
TypeScript

import { useSelector } from 'react-redux';
import { isMobileBrowser } from '../base/environment/utils';
import { isVpaasMeeting } from '../jaas/functions';
import EmbedMeetingButton from './components/EmbedMeetingButton';
const embed = {
key: 'embedmeeting',
Content: EmbedMeetingButton,
group: 4
};
/**
* A hook that returns the embed button if it is enabled and undefined otherwise.
*
* @returns {Object | undefined}
*/
export function useEmbedButton() {
const _isVpaasMeeting = useSelector(isVpaasMeeting);
if (!isMobileBrowser() && !_isVpaasMeeting) {
return embed;
}
}