From 89bd18a387f12f1fd1bba29abaf192b690a5231c Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Tue, 21 Jul 2015 21:54:07 -0700 Subject: [PATCH] reset info on router transition --- common/app/routes/Hikes/components/Question.jsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/common/app/routes/Hikes/components/Question.jsx b/common/app/routes/Hikes/components/Question.jsx index 4b90901ba1..0a92be42d8 100644 --- a/common/app/routes/Hikes/components/Question.jsx +++ b/common/app/routes/Hikes/components/Question.jsx @@ -13,7 +13,6 @@ import { const debug = debugFactory('freecc:hikes'); const ANSWER_THRESHOLD = 250; - export default React.createClass({ displayName: 'Question', @@ -143,8 +142,11 @@ export default React.createClass({ this.transitionTo('/hikes'); }, - routerWillLeave(/* nextState, router, cb[optional] */) { + routerWillLeave(nextState, router, cb) { // TODO(berks): do animated transitions here stuff here + this.setState({ + showInfo: false + }, cb); }, renderInfo(showInfo, info) {