// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. // See License.txt for license information. var ChannelStore = require('../stores/channel_store.jsx'); var UserStore = require('../stores/user_store.jsx'); var utils = require('../utils/utils.jsx'); module.exports = React.createClass({ handleClose: function() { var townSquare = ChannelStore.getByName("town-square"); utils.switchChannel(townSquare); $(this.refs.title.getDOMNode()).text("") $(this.refs.body.getDOMNode()).text(""); }, componentDidMount: function() { $(this.getDOMNode()).on('hidden.bs.modal',this.handleClose); }, componentWillUnmount: function() { $(this.getDOMNode()).off('hidden.bs.modal',this.handleClose); }, render: function() { currentUser = UserStore.getCurrentUser(); if (currentUser != null) { return ( ); } else { return
; } } });