 
   sortedDisussions: ->
     discussions = @props.currentDiscussions[@props.mode]
-    if @state.sortField == 'updated_at'
-      discussions.sort (a, b) ->
-        if Date.parse(a.updated_at) < Date.parse(b.updated_at) then 1 else -1
-    else
-      discussions.sort (a, b) ->
-        if Date.parse(a.created_at) > Date.parse(b.created_at) then 1 else -1
-
+    discussions.sort sortPresets[@state.sortField].sort
 
 
   timelineCircle: =>


bn = 'beatmap-discussions'
lp = 'beatmaps.discussions'

class BeatmapDiscussions.Discussions extends React.PureComponent
  constructor: (props) ->

              className: "#{bn}__toolbar-link"
              'data-type': 'sort'
              onClick: @changeSort
              el Icon, name: sortPresets[@state.sortField].icon
              span className: 'btn-osu-lite__right', sortPresets[@state.sortField].text

            a
              href: '#'
