bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/actions-bar/interactions-button/container.jsx

33 lines
1.0 KiB
React
Raw Normal View History

2023-04-28 05:31:11 +08:00
import React from 'react';
import { withTracker } from 'meteor/react-meteor-data';
2023-04-28 05:31:11 +08:00
import { layoutSelectInput, layoutDispatch } from '/imports/ui/components/layout/context';
import deviceInfo from '/imports/utils/deviceInfo';
import { injectIntl } from 'react-intl';
import InteractionsButton from './component';
import actionsBarService from '../service';
import { layoutSelect } from '../../layout/context';
const InteractionsButtonContainer = ({ ...props }) => {
2023-04-28 05:31:11 +08:00
const layoutContextDispatch = layoutDispatch();
const sidebarContent = layoutSelectInput((i) => i.sidebarContent);
const { sidebarContentPanel } = sidebarContent;
const { isMobile } = deviceInfo;
const isRTL = layoutSelect((i) => i.isRTL);
return (
<InteractionsButton {...{
layoutContextDispatch, sidebarContentPanel, isMobile, isRTL, ...props,
}}
/>
);
};
2023-04-28 05:31:11 +08:00
export default injectIntl(withTracker(() => {
const currentUser = actionsBarService.currentUser();
return {
userId: currentUser.userId,
emoji: currentUser.emoji,
};
2023-04-28 05:31:11 +08:00
})(InteractionsButtonContainer));