2022-05-20 02:53:48 +08:00
|
|
|
import React from 'react';
|
2020-08-04 21:27:32 +08:00
|
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
|
|
import Auth from '/imports/ui/services/auth';
|
2021-10-20 04:35:39 +08:00
|
|
|
import Meetings from '/imports/api/meetings';
|
2020-08-04 21:27:32 +08:00
|
|
|
import ChatDropdown from './component';
|
2022-05-13 21:42:19 +08:00
|
|
|
import { layoutSelect } from '../../layout/context';
|
2020-08-04 21:27:32 +08:00
|
|
|
|
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
|
|
|
};
|
2020-08-04 21:27:32 +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);
|