mirror of
https://gitcode.com/GitHub_Trending/ji/jitsi-meet.git
synced 2026-05-18 14:37:45 +00:00
24 lines
600 B
TypeScript
24 lines
600 B
TypeScript
|
|
import { useSelector } from 'react-redux';
|
||
|
|
|
||
|
|
import FileSharingButton from './components/web/FileSharingButton';
|
||
|
|
import { isFileSharingEnabled } from './functions.any';
|
||
|
|
|
||
|
|
const fileSharing = {
|
||
|
|
key: 'filesharing',
|
||
|
|
Content: FileSharingButton,
|
||
|
|
group: 2
|
||
|
|
};
|
||
|
|
|
||
|
|
/**
|
||
|
|
* A hook that returns the file sharing button if it is enabled and undefined otherwise.
|
||
|
|
*
|
||
|
|
* @returns {Object | undefined} - The file sharing button object or undefined.
|
||
|
|
*/
|
||
|
|
export function useFileSharingButton() {
|
||
|
|
const isEnabled = useSelector(isFileSharingEnabled);
|
||
|
|
|
||
|
|
if (isEnabled) {
|
||
|
|
return fileSharing;
|
||
|
|
}
|
||
|
|
}
|