reset info on router transition

This commit is contained in:
Berkeley Martinez
2015-07-21 21:54:07 -07:00
parent 81d1c25639
commit 89bd18a387

View File

@ -13,7 +13,6 @@ import {
const debug = debugFactory('freecc:hikes'); const debug = debugFactory('freecc:hikes');
const ANSWER_THRESHOLD = 250; const ANSWER_THRESHOLD = 250;
export default React.createClass({ export default React.createClass({
displayName: 'Question', displayName: 'Question',
@ -143,8 +142,11 @@ export default React.createClass({
this.transitionTo('/hikes'); this.transitionTo('/hikes');
}, },
routerWillLeave(/* nextState, router, cb[optional] */) { routerWillLeave(nextState, router, cb) {
// TODO(berks): do animated transitions here stuff here // TODO(berks): do animated transitions here stuff here
this.setState({
showInfo: false
}, cb);
}, },
renderInfo(showInfo, info) { renderInfo(showInfo, info) {