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() {
|
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();
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -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() {
|
||||||
|
Loading…
Reference in New Issue
Block a user