diff --git a/js/components/whitelabel/prize/simple_prize/components/ascribe_detail/prize_piece_container.js b/js/components/whitelabel/prize/simple_prize/components/ascribe_detail/prize_piece_container.js index 6e1ea3b0..a49eac68 100644 --- a/js/components/whitelabel/prize/simple_prize/components/ascribe_detail/prize_piece_container.js +++ b/js/components/whitelabel/prize/simple_prize/components/ascribe_detail/prize_piece_container.js @@ -75,7 +75,7 @@ let PieceContainer = React.createClass({ // the piece detail a second time PieceActions.updatePiece({}); - PieceActions.fetchOne(this.props.params.pieceId); + this.loadPiece(); UserActions.fetchCurrentUser(); }, @@ -119,6 +119,10 @@ let PieceContainer = React.createClass({ } }, + loadPiece() { + PieceActions.fetchOne(this.props.params.pieceId); + }, + render() { const { currentUser, piece } = this.state; diff --git a/js/components/whitelabel/prize/simple_prize/components/prize_piece_list.js b/js/components/whitelabel/prize/simple_prize/components/prize_piece_list.js index 972b3fac..23cdbb23 100644 --- a/js/components/whitelabel/prize/simple_prize/components/prize_piece_list.js +++ b/js/components/whitelabel/prize/simple_prize/components/prize_piece_list.js @@ -48,9 +48,8 @@ let PrizePieceList = React.createClass({ }, getButtonSubmit() { - const { currentUser } = this.state; - if (this.state.prize && this.state.prize.active && - !currentUser.is_jury && !currentUser.is_admin && !currentUser.is_judge){ + const { currentUser, prize } = this.state; + if (prize && prize.active && !currentUser.is_jury && !currentUser.is_admin && !currentUser.is_judge) { return (