       name: 'cover_file'
       disabled: !@props.canUpload
 
-    @uploadButtonContainer.appendChild($uploadButton[0])
+    @uploadButtonContainer.current.appendChild($uploadButton[0])
 
     $uploadButton.fileupload
       url: laroute.route('account.cover')



  $uploadButton: =>
    $(@uploadButtonContainer).find('.js-profile-cover-upload')



class ProfilePage.CoverUploader extends React.Component
  constructor: (props) ->
    super props

    @uploadButtonContainer = React.createRef()


  componentDidMount: =>
    $dropzone = $('.js-profile-cover-upload--dropzone')

