2018-07-12 08:09:41 +00:00
|
|
|
import withColours from 'Components/utils/withColours'
|
|
|
|
import withTracker from 'Components/utils/withTracker'
|
2018-04-26 15:30:51 +00:00
|
|
|
import React, { Component } from 'react'
|
|
|
|
import { Trans, translate } from 'react-i18next'
|
2018-06-08 14:17:32 +00:00
|
|
|
import { Element, scroller } from 'react-scroll'
|
2018-07-12 08:09:41 +00:00
|
|
|
import { LinkButton } from 'Ui/Button'
|
2018-06-18 12:53:07 +00:00
|
|
|
import './conversation/conversation.css'
|
2018-04-26 15:30:51 +00:00
|
|
|
|
|
|
|
@translate()
|
|
|
|
@withColours
|
2018-06-18 16:03:52 +00:00
|
|
|
@withTracker
|
2018-04-26 15:30:51 +00:00
|
|
|
export default class GoToExplanation extends Component {
|
|
|
|
handleScrollToResults = () => {
|
2018-06-18 16:03:52 +00:00
|
|
|
this.props.tracker.push(['trackEvent', 'simulation', 'goToExplanation'])
|
2018-04-26 15:30:51 +00:00
|
|
|
scroller.scrollTo('resultsScrollElement', {
|
|
|
|
smooth: true,
|
|
|
|
duration: 200,
|
|
|
|
delay: 0
|
|
|
|
})
|
|
|
|
}
|
|
|
|
render() {
|
|
|
|
return (
|
|
|
|
<Element name="resultsScrollElement" id="resultsScrollElement">
|
2018-07-12 08:09:41 +00:00
|
|
|
<LinkButton
|
2018-04-26 15:30:51 +00:00
|
|
|
className="scrollIndication down"
|
2018-06-12 10:21:36 +00:00
|
|
|
onClick={this.handleScrollToResults}>
|
|
|
|
<i className="fa fa-long-arrow-down" aria-hidden="true" />
|
|
|
|
<Trans i18nKey="details">Comprendre mes résultats</Trans>
|
2018-07-12 08:09:41 +00:00
|
|
|
</LinkButton>
|
2018-04-26 15:30:51 +00:00
|
|
|
</Element>
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|