theluyuan 38ba663466
Some checks failed
Close stale issues and PRs / stale (push) Has been cancelled
init
2025-09-02 14:49:16 +08:00

25 lines
549 B
TypeScript

import { useSelector } from 'react-redux';
import { SharedVideoButton } from './components';
import { isSharedVideoEnabled } from './functions';
const shareVideo = {
key: 'sharedvideo',
Content: SharedVideoButton,
group: 3
};
/**
* A hook that returns the shared video button if it is enabled and undefined otherwise.
*
* @returns {Object | undefined}
*/
export function useSharedVideoButton() {
const sharedVideoEnabled = useSelector(isSharedVideoEnabled);
if (sharedVideoEnabled) {
return shareVideo;
}
}