mirror of
https://github.com/ascribe/onion.git
synced 2024-12-23 01:39:36 +01:00
Cosmetic changes for EditionContainer & PieceContainer
This commit is contained in:
parent
0b2bc1c57b
commit
4fe10bb887
@ -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();
|
||||
},
|
||||
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user