{"size": 928, "ext": "js", "max_stars_repo_path": "src/client/components/App.js", "max_stars_repo_name": "orrybaram/chatty", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "src/client/components/App.js", "max_issues_repo_name": "orrybaram/chatty", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/client/components/App.js", "max_forks_repo_name": "orrybaram/chatty", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.7948717949, "max_line_length": 88, "alphanum_fraction": 0.6476293103}
import React, { Component, PropTypes } from 'react';
import { observer } from 'mobx-react';
import ChatWindow from './ChatWindow';
import '../styles/index.css';

const propTypes = {
  stores: PropTypes.object
};

@observer
class App extends Component {
  constructor(props) {
    super(props);

    const { UserStore, MessageStore, ChatWindowStore } = props.stores;

    this.userOne = new UserStore(0);
    this.userTwo = new UserStore(1);
    this.messageStore = new MessageStore(0);
    this.chatOne = new ChatWindowStore(this.userOne, [this.userTwo], this.messageStore);
    this.chatTwo = new ChatWindowStore(this.userTwo, [this.userOne], this.messageStore);
  }
  render() {
    return (
      <div className='app'>
        <ChatWindow
          chatStore={this.chatTwo}
        />
        <ChatWindow
          chatStore={this.chatOne}
        />
      </div>
    );
  }
}

App.propTypes = propTypes;
export default App;
