bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/chat/chat-dropdown/container.jsx

25 lines
713 B
React
Raw Normal View History

2022-05-20 02:53:48 +08:00
import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
import Auth from '/imports/ui/services/auth';
import Meetings from '/imports/api/meetings';
import ChatDropdown from './component';
2022-05-13 21:42:19 +08:00
import { layoutSelect } from '../../layout/context';
2021-03-25 04:20:33 +08:00
const ChatDropdownContainer = ({ ...props }) => {
2022-05-13 21:42:19 +08:00
const isRTL = layoutSelect((i) => i.isRTL);
2021-03-25 04:20:33 +08:00
2022-05-20 02:53:48 +08:00
return <ChatDropdown {...{ isRTL, ...props }} />;
2021-03-25 04:20:33 +08:00
};
export default withTracker(() => {
const getMeetingName = () => {
const m = Meetings.findOne({ meetingId: Auth.meetingID },
{ fields: { 'meetingProp.name': 1 } });
return m.meetingProp.name;
};
return {
meetingName: getMeetingName(),
};
})(ChatDropdownContainer);