bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/actions-bar/raise-hand-button/container.jsx

27 lines
632 B
React
Raw Normal View History

import React from 'react';
import { injectIntl } from 'react-intl';
import RaiseHandButton from './component';
import Auth from '/imports/ui/services/auth';
import useCurrentUser from '/imports/ui/core/hooks/useCurrentUser';
const RaiseHandButtonContainer = ({ ...props }) => {
const { data: currentUserData } = useCurrentUser((user) => ({
raiseHand: user.raiseHand,
}));
const currentUser = {
userId: Auth.userID,
raiseHand: currentUserData?.raiseHand,
};
return (
<RaiseHandButton {...{
...currentUser,
...props,
}}
/>
);
};
export default injectIntl(RaiseHandButtonContainer);