jam-cloud/web/app/assets/javascripts/react-components/BroadcastNotification.jsx

25 lines
857 B
JavaScript

var React = require('react');
var BroadcastNotificationStore = require('./stores/BroadcastNotificationStore');
var BroadcastNotification = React.createClass({displayName: 'Broadcast Notification',
mixins: [Reflux.connect(BroadcastNotificationStore, 'notification')],
render: function() {
if(!this.state.notification) {
return <div>HAHAHAAH</div>
}
return <div className="broadcast-notification">
<div className="message" dangerouslySetInnerHTML={this.state.notification.message}/>
<div className="actions">
<a className="button-orange"
href={this.state.notification.button_url}>{this.state.notification.button_label}</a>
<a className="not-now" href="#">not now, thanks</a>
</div>
</div>
}
});
// each file will export exactly one component
module.exports = BroadcastNotification;