 alert = require '../lib/alert'
 AddZooTeamForm = require './add-zoo-team-form'
 DragReorderable = require 'drag-reorderable'
+Paginator = require './lib/paginator'
 
 module?.exports = React.createClass
   displayName: 'TalkInit'

          </section>
        </div>
      </div>
    </div>


  getInitialState: ->
    boards: []
    boardsMeta: {}
    loading: true
    moderationOpen: false

  getDefaultProps: ->
    query: page: 1

  componentWillReceiveProps: (nextProps) ->
    if nextProps.query.page isnt @props.query.page
      @setBoards({}, nextProps)

  setBoards: (propValue, props = @props) ->
    talkClient.type('boards').get(section: props.section, page_size: 20, page: props.query.page)
      .then (boards) =>
        boardsMeta = boards[0]?.getMeta()
        @setState {boards, boardsMeta, loading: false}

  boardPreview: (data, i) ->
    <BoardPreview {...@props} key={i} data={data} />
