From 108179e72e3ea7b70c999a0e4515b8f1762073fe Mon Sep 17 00:00:00 2001 From: Berkeley Martinez Date: Sat, 5 Dec 2015 09:35:05 -0800 Subject: [PATCH] Fix react motion api change --- common/app/routes/Hikes/components/Question.jsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/common/app/routes/Hikes/components/Question.jsx b/common/app/routes/Hikes/components/Question.jsx index 4f7e97f149..63dd15407d 100644 --- a/common/app/routes/Hikes/components/Question.jsx +++ b/common/app/routes/Hikes/components/Question.jsx @@ -1,5 +1,5 @@ import React, { PropTypes } from 'react'; -import { Spring } from 'react-motion'; +import { Motion } from 'react-motion'; import { History, Lifecycle } from 'react-router'; import debugFactory from 'debug'; import { @@ -215,7 +215,8 @@ export default React.createClass({ }, renderQuestion(number, question, answer, shake) { - return ({ val: { x } }) => { + return ({ x: xFunc }) => { + const x = xFunc().val.x; const style = { WebkitTransform: `translate3d(${ x }px, 0, 0)`, transform: `translate3d(${ x }px, 0, 0)` @@ -252,9 +253,9 @@ export default React.createClass({ xs={ 8 } xsOffset={ 2 }> - + { this.renderQuestion(number, question, answer, shake) } - + { this.renderInfo(showInfo, info) }