fbcc611bd9
Interactions button is a button that stays in action bar. Integrates several features in just one place: user-reaction, raise hand, user-status (away/not away), toggle question panel.
28 lines
1016 B
JavaScript
28 lines
1016 B
JavaScript
import React, { useContext } from 'react';
|
|
import { withTracker } from 'meteor/react-meteor-data';
|
|
import { withModalMounter } from '/imports/ui/components/modal/service';
|
|
import LayoutContext from '/imports/ui/components/layout/context';
|
|
import { injectIntl } from 'react-intl';
|
|
import InteractionsButton from './component';
|
|
import actionsBarService from '../service';
|
|
|
|
const InteractionsButtonContainer = ({ ...props }) => {
|
|
const layoutContext = useContext(LayoutContext);
|
|
const { layoutContextState, layoutContextDispatch } = layoutContext;
|
|
const { input } = layoutContextState;
|
|
const { sidebarContent } = input;
|
|
const { sidebarContentPanel } = sidebarContent;
|
|
return (
|
|
<InteractionsButton {...{ layoutContextDispatch, sidebarContentPanel, ...props }} />
|
|
);
|
|
};
|
|
|
|
export default injectIntl(withModalMounter(withTracker(() => {
|
|
const currentUser = actionsBarService.currentUser();
|
|
|
|
return {
|
|
userId: currentUser.userId,
|
|
emoji: currentUser.emoji,
|
|
};
|
|
})(InteractionsButtonContainer)));
|