1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-28 08:37:59 +02:00

Cosmetic changes for EditionContainer & PieceContainer

This commit is contained in:
Tim Daubenschütz 2015-11-30 18:26:27 +01:00
parent 0b2bc1c57b
commit 4fe10bb887
2 changed files with 3 additions and 10 deletions

View File

@ -32,12 +32,13 @@ let EditionContainer = React.createClass({
},
componentDidMount() {
EditionStore.listen(this.onChange);
// Every time we're entering the edition detail page,
// just reset the edition that is saved in the edition store
// as it will otherwise display wrong/old data once the user loads
// the edition detail a second time
EditionActions.updateEdition({});
EditionStore.listen(this.onChange);
this.loadEdition();
},

View File

@ -70,24 +70,16 @@ let PieceContainer = React.createClass({
},
componentDidMount() {
// Every time we're entering the piece detail page,
// just reset the piece that is saved in the piece store
// as it will otherwise display wrong/old data once the user loads
// the piece detail a second time
PieceActions.updatePiece({});
UserStore.listen(this.onChange);
PieceListStore.listen(this.onChange);
PieceStore.listen(this.onChange);
// Every time we enter the piece detail page, just reset the piece
// store as it will otherwise display wrong/old data once the user loads
// the piece detail a second time
PieceActions.updatePiece({});
this.loadPiece();
UserActions.fetchCurrentUser();
PieceActions.fetchOne(this.props.params.pieceId);
},
componentDidUpdate() {