 React = require 'react'
+apiClient = require 'panoptes-client/lib/api-client'
 talkClient = require 'panoptes-client/lib/talk-client'
 Comment = require '../talk/comment'
 Paginator = require '../talk/lib/paginator'

      sort: '-created_at'

    talkClient.type('comments').get(query).then (comments) =>
        meta = comments[0]?.getMeta() or { }
        @setState {comments, meta}

  render: ->
    return <Loading /> unless @state.comments

        <h2>Comments:</h2>
        <div>
          {for comment in @state.comments
            <Comment
              {...@props}
              key={"comment-#{comment.id}"}
              data={comment}
              author={@state.authors[comment.user_id]}
              roles={@state.author_roles[comment.user_id]}
              locked={true}
              linked={true}
              hideFocus={true}
            />}
        </div>

        {if +@state.meta.page_count > 1
