ajoute un scroll lent lors du début d'une simulation
parent
4881be2f36
commit
ac4e036a9b
|
@ -114,7 +114,7 @@ export default class Simu extends Component {
|
|||
<div id="focusZone">
|
||||
{displayConversation && (
|
||||
<>
|
||||
<ScrollToTop />
|
||||
<ScrollToTop behavior="smooth" />
|
||||
<Conversation textColourOnWhite={colours.textColourOnWhite} />
|
||||
</>
|
||||
)}
|
||||
|
|
|
@ -1,9 +1,13 @@
|
|||
import { Component } from 'react'
|
||||
|
||||
export default class ScrollToTop extends Component {
|
||||
props = {
|
||||
behavior: 'auto'
|
||||
}
|
||||
componentDidMount() {
|
||||
window.scroll({
|
||||
top: 0
|
||||
top: 0,
|
||||
behavior: this.props.behavior
|
||||
})
|
||||
}
|
||||
render() {
|
||||
|
|
Loading…
Reference in New Issue