mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 01:25:17 +01:00
add componentWillReceiveProps in ikono piece detail again
This commit is contained in:
parent
6102ed3bb4
commit
bd99adf4c9
@ -55,6 +55,14 @@ let IkonotvPieceContainer = React.createClass({
|
||||
this.loadPiece();
|
||||
},
|
||||
|
||||
// We need this for when the user clicks on a notification while being in another piece view
|
||||
componentWillReceiveProps(nextProps) {
|
||||
if(this.props.params.pieceId !== nextProps.params.pieceId) {
|
||||
PieceActions.updatePiece({});
|
||||
PieceActions.fetchOne(nextProps.params.pieceId);
|
||||
}
|
||||
},
|
||||
|
||||
componentWillUnmount() {
|
||||
PieceStore.unlisten(this.onChange);
|
||||
UserStore.unlisten(this.onChange);
|
||||
|
Loading…
Reference in New Issue
Block a user