diff --git a/package.json b/package.json index 30988b416..f293fc631 100644 --- a/package.json +++ b/package.json @@ -27,6 +27,7 @@ "react-redux": "^5.0.5", "react-router": "^4.1.1", "react-router-dom": "^4.1.1", + "react-scroll": "^1.5.4", "reduce-reducers": "^0.1.2", "redux": "^3.6.0", "redux-form": "6.8.0", @@ -54,8 +55,8 @@ "chokidar": "^1.7.0", "core-js": "^2.4.1", "css-loader": "^0.28.1", - "eslint": "^4.4.1", "daggy": "^1.1.0", + "eslint": "^4.4.1", "eslint-plugin-react": "^7.0.1", "express": "^4.15.3", "fantasy-combinators": "0.0.1", diff --git a/source/components/conversation/Conversation.js b/source/components/conversation/Conversation.js index 0809324f9..0b2bffa76 100644 --- a/source/components/conversation/Conversation.js +++ b/source/components/conversation/Conversation.js @@ -3,6 +3,7 @@ import R from 'ramda' import Aide from '../Aide' import Satisfaction from '../Satisfaction' import {reduxForm} from 'redux-form' +import Scroll from 'react-scroll' @reduxForm({ form: "conversation", @@ -11,7 +12,8 @@ import {reduxForm} from 'redux-form' export default class Conversation extends Component { render() { let {foldedSteps, unfoldedSteps, extraSteps, reinitalise, situation, situationGate} = this.props - window.scrollTo(0,document.body.scrollHeight) + + Scroll.animateScroll.scrollToBottom() return (