32 lines
980 B
CoffeeScript
32 lines
980 B
CoffeeScript
context = window
|
|
|
|
ReactCSSTransitionGroup = React.addons.CSSTransitionGroup;
|
|
|
|
BroadcastHolder = React.createClass(
|
|
{
|
|
displayName: 'Broadcast Notification Holder',
|
|
|
|
mixins: [Reflux.connect(context.JK.Stores.Broadcast, 'notification')]
|
|
|
|
render: ->
|
|
notification = []
|
|
if this.state.notification
|
|
|
|
if this.state.notification.isJamClass
|
|
result = `<JamClassPhone key="jamclassphone" />`
|
|
else if this.state.notification.isLesson
|
|
result = `<InLessonBroadcast key={'lesson'} lessonSession={this.state.notification}/>`
|
|
else
|
|
result = `<Broadcast key={this.state.notification.id} notification={this.state.notification}/>`
|
|
|
|
if result?
|
|
notification.push(result)
|
|
|
|
`<div id="broadcast-notification-holder" className="broadcast-notification-holder" >
|
|
{notification}
|
|
</div>`
|
|
});
|
|
|
|
context.JK.Components.BroadcastHolder = BroadcastHolder
|
|
context.BroadcastHolder = BroadcastHolder
|