bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/user-list/container.jsx
Gabriel Carvalho de Campes 0cc29d13b1 Polish code
2016-09-14 14:48:50 -03:00

40 lines
897 B
JavaScript

import React, { Component } from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import Service from './service.js';
import UserList from './component.jsx';
class UserListContainer extends Component {
render() {
const {
compact,
users,
currentUser,
openChats,
openChat,
userActions,
children,
} = this.props;
return (
<UserList
compact={compact}
users={users}
currentUser={currentUser}
openChats={openChats}
openChat={openChat}
userActions={userActions}>
{children}
</UserList>
);
}
}
export default createContainer(({ params }) => ({
users: Service.getUsers(),
currentUser: Service.getCurrentUser(),
openChats: Service.getOpenChats(params.chatID),
openChat: params.chatID,
userActions: Service.userActions,
}), UserListContainer);