bigbluebutton-Github/bigbluebutton-html5/imports/ui/components/chat/container.jsx
2016-05-23 10:09:47 -03:00

32 lines
662 B
JavaScript

import React, { Component, PropTypes } from 'react';
import { createContainer } from 'meteor/react-meteor-data';
import Chat from './component';
class ChatContainer extends Component {
constructor(props) {
super(props);
this.state = {
currentChat: null,
};
}
componentDidMount() {
const chatID = this.props.params.id || 'public';
this.setState({ currentChat: chatID });
}
render() {
const { chatID, ...props } = this.props.params;
return (
<Chat currentChat={chatID} {...props}>
{this.props.children}
</Chat>
);
}
}
export default createContainer(() => {
return {};
}, ChatContainer);