File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -1134,7 +1134,6 @@ module ControlPanel = {
11341134 }
11351135 }
11361136
1137- @val @scope (("window" , "location" )) external origin : string = "origin"
11381137 @react.component
11391138 let make = (
11401139 ~actionIndicatorKey : string ,
@@ -1173,8 +1172,8 @@ module ControlPanel = {
11731172
11741173 let querystring = params -> Array .map (((key , value )) => key ++ "=" ++ value )-> Array .join ("&" )
11751174
1176- let url = origin ++ router .route ++ "?" ++ querystring
1177- Next . Router . replace ( router , url )
1175+ let url = router .route ++ "?" ++ querystring
1176+ Webapi . Window . History . replaceState ( null , ~ url )
11781177 url
11791178 }
11801179
Original file line number Diff line number Diff line change @@ -48,6 +48,13 @@ module Window = {
4848 @scope ("window" ) @val external innerWidth : int = "innerWidth"
4949 @scope ("window" ) @val external innerHeight : int = "innerHeight"
5050 @scope ("window" ) @val external scrollY : int = "scrollY"
51+
52+ module History = {
53+ @scope (("window" , "history" )) @val
54+ external pushState : (nullable <'a >, @as (json ` ""` ) _ , ~url : string = ?) => unit = "pushState"
55+ @scope (("window" , "history" )) @val
56+ external replaceState : (nullable <'a >, @as (json ` ""` ) _ , ~url : string = ?) => unit = "replaceState"
57+ }
5158}
5259
5360module Fetch = {
You can’t perform that action at this time.
0 commit comments