2016-06-29 03:52:03 +08:00
|
|
|
import React, { Component } from 'react';
|
2016-05-20 02:22:56 +08:00
|
|
|
import { createContainer } from 'meteor/react-meteor-data';
|
2017-03-16 00:21:26 +08:00
|
|
|
import { meetingIsBreakout } from '/imports/ui/components/app/service';
|
2017-05-04 00:56:27 +08:00
|
|
|
import { makeCall } from '/imports/ui/services/api';
|
2016-05-20 02:22:56 +08:00
|
|
|
import Service from './service.js';
|
2017-06-19 19:57:32 +08:00
|
|
|
import Meetings from '/imports/api/1.1/meetings';
|
2016-05-20 02:22:56 +08:00
|
|
|
|
|
|
|
import UserList from './component.jsx';
|
|
|
|
|
|
|
|
class UserListContainer extends Component {
|
|
|
|
render() {
|
2016-09-15 01:48:50 +08:00
|
|
|
const {
|
|
|
|
compact,
|
|
|
|
users,
|
|
|
|
currentUser,
|
|
|
|
openChats,
|
|
|
|
openChat,
|
|
|
|
userActions,
|
2017-03-16 03:03:56 +08:00
|
|
|
isBreakoutRoom,
|
2016-09-15 01:48:50 +08:00
|
|
|
children,
|
2017-05-16 03:26:03 +08:00
|
|
|
meeting,
|
2016-09-15 01:48:50 +08:00
|
|
|
} = this.props;
|
|
|
|
|
2016-05-20 02:22:56 +08:00
|
|
|
return (
|
|
|
|
<UserList
|
2016-09-15 01:48:50 +08:00
|
|
|
compact={compact}
|
|
|
|
users={users}
|
2017-05-16 03:26:03 +08:00
|
|
|
meeting={meeting}
|
2016-09-15 01:48:50 +08:00
|
|
|
currentUser={currentUser}
|
|
|
|
openChats={openChats}
|
|
|
|
openChat={openChat}
|
2017-03-16 03:03:56 +08:00
|
|
|
isBreakoutRoom={isBreakoutRoom}
|
2017-05-04 00:56:27 +08:00
|
|
|
makeCall={makeCall}
|
2017-06-03 03:25:02 +08:00
|
|
|
userActions={userActions}
|
|
|
|
>
|
2016-09-15 01:48:50 +08:00
|
|
|
{children}
|
2016-05-20 02:22:56 +08:00
|
|
|
</UserList>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-06-28 21:10:20 +08:00
|
|
|
export default createContainer(({ params }) => ({
|
2016-06-07 00:45:30 +08:00
|
|
|
users: Service.getUsers(),
|
2017-05-16 03:26:03 +08:00
|
|
|
meeting: Meetings.findOne({}),
|
2016-06-28 21:10:20 +08:00
|
|
|
currentUser: Service.getCurrentUser(),
|
2016-06-30 22:45:19 +08:00
|
|
|
openChats: Service.getOpenChats(params.chatID),
|
|
|
|
openChat: params.chatID,
|
2016-06-28 21:10:20 +08:00
|
|
|
userActions: Service.userActions,
|
2017-03-16 02:03:58 +08:00
|
|
|
isBreakoutRoom: meetingIsBreakout(),
|
2016-06-07 00:45:30 +08:00
|
|
|
}), UserListContainer);
|