   , []
   [dropdown, setDropdown] = useState false
 
-  onSortSetDefault = (e) ->
-    e.stopPropagation()
-    unparsed = unparseSort sortBy
-    console.log "Setting default sort for #{group} to #{unparsed}"
-    Meteor.call 'groupDefaultSort', group, unparsed
   onRename = (e) ->
     Modal.show 'groupRename'
   onPost = (e) ->

        console.error "messageNew did not return problem -- not authorized?"

  <> {###<div className="group-right-buttons">###}
    {if superuser
      <div className="btn-group">
        <button className="btn btn-warning sortSetDefault" onClick={onSortSetDefault}>
          Set Group Default Sort
        </button>
        {if can.globalSuper
          <button className="btn btn-danger groupRenameButton" onClick={onRename}>
            Rename Group
          </button>
        }
      </div>
    }


GroupButtons.displayName = 'GroupButtons'

export GroupSorts = React.memo ({group, can, sortBy, clusterBy, tags}) ->
  superuser = useTracker ->
    Session.get 'super'
  , []
  onSortSetDefault = (e) ->
    e.stopPropagation()
    unparsed = unparseSort sortBy
    console.log "Setting default sort for #{group} to #{unparsed}"
    Meteor.call 'groupDefaultSort', group, unparsed
  dropSpec = (key) ->
    accept: 'group-sort'
    drop: (item, monitor) ->
