 
 
   componentWillUnmount: =>
-    $.unsubscribe '.profilePage'
-    $(window).off '.profilePage'
+    $.unsubscribe ".#{@eventId}"
+    $(window).off ".#{@eventId}"
 
     for sortable in [@pages, @tabs]
       $(sortable.current).sortable 'destroy'

  constructor: (props) ->
    super props

    @tabs = React.createRef()
    @pages = React.createRef()
    @state = JSON.parse(props.container.dataset.profilePageState ? null)



  componentDidMount: =>
    $.subscribe "user:update.#{@eventId}", @userUpdate
    $.subscribe "user:page:update.#{@eventId}", @userPageUpdate
    $.subscribe "profile:showMore.#{@eventId}", @showMore
    $.subscribe "profile:page:jump.#{@eventId}", @pageJump
    $(window).on "scroll.#{@eventId}", @pageScan
    $(document).on "turbolinks:before-cache.#{@eventId}", @saveStateToContainer

    $(@pages.current).sortable
      cursor: 'move'
