File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -21,7 +21,11 @@ import Caret from "../../images/svgs/caret.svg";
21
21
import Copy from "../../images/svgs/copy.svg" ;
22
22
23
23
const scrollToTop = ( ) => {
24
- window . setTimeout ( ( ) => window . scrollTo ( 0 , 0 , "smooth" ) ) ;
24
+ window . scrollTo ( {
25
+ top : 0 ,
26
+ left : 0 ,
27
+ behavior : "smooth"
28
+ } ) ;
25
29
} ;
26
30
27
31
const apiPage = ( { data } ) => {
Original file line number Diff line number Diff line change @@ -11,7 +11,11 @@ import Sidebar from "../../components/2_molecules/sidemenu";
11
11
import Caret from "../../images/svgs/caret.svg" ;
12
12
13
13
const scrollToTop = ( ) => {
14
- window . setTimeout ( ( ) => window . scrollTo ( 0 , 0 , "smooth" ) ) ;
14
+ window . scrollTo ( {
15
+ top : 0 ,
16
+ left : 0 ,
17
+ behavior : "smooth"
18
+ } ) ;
15
19
} ;
16
20
17
21
const HeadingRenderer = props => {
You can’t perform that action at this time.
0 commit comments