var React = require('react')
var Icon = require('icon.jsx')
var Link = require('react-router').Link
module.exports = function (boardsAPI) {
return React.createClass({
getInitialState: function () {
return { api: false, loading: true }
},
componentDidMount () {
boardsAPI.use(boards => {
if (boards.isInit) this.setState({ api: true })
boards.getEventEmitter().on('init', err => {
if (!this.isMounted()) return
if (err) {
this.setState({ loading: false, api: false })
} else {
this.setState({ api: true })
}
})
})
},
extraButtons: function () {
if (this.state.api) {
return