40 lines
1.2 KiB
CoffeeScript
40 lines
1.2 KiB
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)
|
|
|
|
else if this.props.is_guitar_center
|
|
guitarCenterLogo = `<div className="guitar-center-logo">
|
|
<img src="/assets/content/guitar-center-logo.png"/>
|
|
</div>`
|
|
|
|
|
|
|
|
`<div id="broadcast-notification-holder" className="broadcast-notification-holder" >
|
|
{guitarCenterLogo}
|
|
{notification}
|
|
</div>`
|
|
});
|
|
|
|
context.JK.Components.BroadcastHolder = BroadcastHolder
|
|
context.BroadcastHolder = BroadcastHolder
|