File tree Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Expand file tree Collapse file tree 3 files changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ let default = () => {
3838 <body >
3939 <Navigation isOverlayOpen setOverlayOpen />
4040 <Outlet />
41+ <ScrollRestoration />
4142 <Scripts />
4243 </body >
4344 </html >
Original file line number Diff line number Diff line change @@ -26,6 +26,11 @@ module Outlet = {
2626 external make : unit => React .element = "Outlet"
2727}
2828
29+ module ScrollRestoration = {
30+ @module ("react-router" ) @react.component
31+ external make : unit => React .element = "ScrollRestoration"
32+ }
33+
2934module Meta = {
3035 @module ("react-router" ) @react.component
3136 external make : unit => React .element = "Meta"
@@ -48,6 +53,7 @@ module Link = {
4853 ~className : string = ?,
4954 ~target : string = ?,
5055 ~to : Path .t ,
56+ ~preventScrollReset : bool = ?,
5157 ) => React .element = "Link"
5258
5359 module Path = {
@@ -61,6 +67,7 @@ module Link = {
6167 ~target : string = ?,
6268 ~id : string = ?,
6369 ~to : to ,
70+ ~preventScrollReset : bool = ?,
6471 ) => React .element = "Link"
6572 }
6673
@@ -72,6 +79,7 @@ module Link = {
7279 ~className : string = ?,
7380 ~target : string = ?,
7481 ~to : string ,
82+ ~preventScrollReset : bool = ?,
7583 ) => React .element = "Link"
7684 }
7785}
Original file line number Diff line number Diff line change @@ -32,6 +32,7 @@ module Toc = {
3232 onClick = {_evt => scrollToAnchor (href )}
3333 to = href
3434 className = "font-normal block text-14 text-gray-40 leading-tight hover:text-gray-80"
35+ preventScrollReset = true
3536 >
3637 {//links, nested
3738 React .string (header )}
You can’t perform that action at this time.
0 commit comments