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

27 lines
879 B
React
Raw Normal View History

import React from 'react';
import RaiseHandDropdown from './component';
import UserListService from '/imports/ui/components/user-list/service';
2023-12-07 21:45:13 +08:00
import { useMutation } from '@apollo/client';
import { SET_EMOJI_STATUS } from '/imports/ui/core/graphql/mutations/userMutations';
import { useStorageKey } from '/imports/ui/services/storage/hooks';
2023-12-07 21:45:13 +08:00
const RaiseHandDropdownContainer = (props) => {
const [setUserEmojiStatus] = useMutation(SET_EMOJI_STATUS);
const isDropdownOpen = useStorageKey('dropdownOpen');
2024-06-11 03:20:38 +08:00
const getEmojiList = UserListService.getEmojiList();
2023-12-07 21:45:13 +08:00
const setEmojiStatus = (emoji) => {
setUserEmojiStatus({ variables: { emoji } });
};
return (
2024-06-11 03:20:38 +08:00
<RaiseHandDropdown
setEmojiStatus={setEmojiStatus}
getEmojiList={getEmojiList}
isDropdownOpen={isDropdownOpen}
{...props}
/>
);
2023-12-07 21:45:13 +08:00
};
2024-06-11 03:20:38 +08:00
export default RaiseHandDropdownContainer;