1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-30 13:41:57 +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() { componentDidMount() {
EditionStore.listen(this.onChange);
// Every time we're entering the edition detail page, // Every time we're entering the edition detail page,
// just reset the edition that is saved in the edition store // just reset the edition that is saved in the edition store
// as it will otherwise display wrong/old data once the user loads // as it will otherwise display wrong/old data once the user loads
// the edition detail a second time // the edition detail a second time
EditionActions.updateEdition({}); EditionActions.updateEdition({});
EditionStore.listen(this.onChange);
this.loadEdition(); this.loadEdition();
}, },

View File

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