// Copyright (c) 2015 Spinpunch, Inc. All Rights Reserved. // See License.txt for license information. var ChannelStore = require('../stores/channel_store.jsx'); module.exports = React.createClass({ componentDidMount: function() { var self = this; if(this.refs.modal) { $(this.refs.modal.getDOMNode()).on('show.bs.modal', function(e) { var button = e.relatedTarget; self.setState({ channel_id: $(button).attr('data-channelid') }); }); } }, getInitialState: function() { return { channel_id: ChannelStore.getCurrentId() }; }, render: function() { var channel = ChannelStore.get(this.state.channel_id); if (!channel) { channel = {}; channel.display_name = "No Channel Found"; channel.name = "No Channel Found"; channel.id = "No Channel Found"; } return (
); } });