2022-09-22 23:02:19 +08:00
|
|
|
import React from 'react';
|
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
|
|
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';
|
2022-09-22 23:02:19 +08:00
|
|
|
|
2023-12-07 21:45:13 +08:00
|
|
|
const RaiseHandDropdownContainer = (props) => {
|
|
|
|
const [setUserEmojiStatus] = useMutation(SET_EMOJI_STATUS);
|
|
|
|
|
|
|
|
const setEmojiStatus = (emoji) => {
|
|
|
|
setUserEmojiStatus({ variables: { emoji } });
|
|
|
|
};
|
|
|
|
|
|
|
|
return <RaiseHandDropdown setEmojiStatus={setEmojiStatus} {...props} />;
|
|
|
|
};
|
2022-09-22 23:02:19 +08:00
|
|
|
|
|
|
|
export default withTracker(() => ({
|
|
|
|
isDropdownOpen: Session.get('dropdownOpen'),
|
|
|
|
getEmojiList: UserListService.getEmojiList(),
|
|
|
|
}))(RaiseHandDropdownContainer);
|