diff --git a/webapp/pages/board.jsx b/webapp/pages/board.jsx index b91d2b9..2dc9c44 100644 --- a/webapp/pages/board.jsx +++ b/webapp/pages/board.jsx @@ -46,13 +46,14 @@ module.exports = function (boardsAPI) { } }) }, - init (boards) { - if (!this.state.init) { - if (this.props.params.userid) { - boards.getBoardSettings(this.props.params.userid, this.props.params.boardname) - } - this.setState({ init: true, api: true, boards: boards }) - } + componentWillReceiveProps (props) { + boardsAPI.use(b => this.init(b, props)) + }, + init (boards, newProps) { + var props = newProps || this.props + if (!props.params.userid) return + boards.getBoardSettings(props.params.userid, props.params.boardname) + this.setState({ loading: true, init: true, api: true, userid: boards.getMyID(), boards: boards }) }, toolbox () { return