diff --git a/source/components/Explanation.js b/source/components/Explanation.js index deadb70d1..1ca22faeb 100644 --- a/source/components/Explanation.js +++ b/source/components/Explanation.js @@ -7,7 +7,7 @@ import Rule from 'Components/rule/Rule' import './Explanation.css' import { pluck } from 'ramda' import { connect } from 'react-redux' - +import { scroller, Element } from 'react-scroll' import SearchButton from './SearchButton' import withColours from './withColours' @@ -17,32 +17,45 @@ import withColours from './withColours' analysis: state.analysis })) export default class Explanation extends Component { + handleScrollToResults = () => { + scroller.scrollTo('resultsScrollElement', { + smooth: true, + duration: 200, + delay: 0 + }) + } render() { let targetRules = path(['analysis', 'targets'], this.props) if (!targetRules) return null return ( -
-

-