22 lines
521 B
CoffeeScript
22 lines
521 B
CoffeeScript
context = window
|
|
|
|
@SessionLeaveBtn = React.createClass({
|
|
|
|
onLeave: (e) ->
|
|
e.preventDefault()
|
|
@rateSession()
|
|
|
|
SessionActions.leaveSession.trigger({location: '/client#/home'})
|
|
|
|
rateSession: () ->
|
|
unless @rateSessionDialog?
|
|
@rateSessionDialog = new context.JK.RateSessionDialog(context.JK.app);
|
|
@rateSessionDialog.initialize();
|
|
|
|
@rateSessionDialog.showDialog();
|
|
|
|
render: () ->
|
|
`<a className="session-leave button-grey right leave" onClick={this.onLeave}>
|
|
X LEAVE
|
|
</a>`
|
|
}) |