2022-09-22 23:02:19 +08:00
|
|
|
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';
|
2024-06-06 21:50:03 +08:00
|
|
|
import { useStorageKey } from '/imports/ui/services/storage/hooks';
|
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);
|
2024-06-06 21:50:03 +08:00
|
|
|
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 } });
|
|
|
|
};
|
|
|
|
|
2024-06-06 21:50:03 +08:00
|
|
|
return (
|
2024-06-11 03:20:38 +08:00
|
|
|
<RaiseHandDropdown
|
|
|
|
setEmojiStatus={setEmojiStatus}
|
|
|
|
getEmojiList={getEmojiList}
|
|
|
|
isDropdownOpen={isDropdownOpen}
|
|
|
|
{...props}
|
|
|
|
/>
|
2024-06-06 21:50:03 +08:00
|
|
|
);
|
2023-12-07 21:45:13 +08:00
|
|
|
};
|
2022-09-22 23:02:19 +08:00
|
|
|
|
2024-06-11 03:20:38 +08:00
|
|
|
export default RaiseHandDropdownContainer;
|