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 = {
1134
1134
}
1135
1135
}
1136
1136
1137
- @val @scope (("window" , "location" )) external origin : string = "origin"
1138
1137
@react.component
1139
1138
let make = (
1140
1139
~actionIndicatorKey : string ,
@@ -1173,8 +1172,8 @@ module ControlPanel = {
1173
1172
1174
1173
let querystring = params -> Array .map (((key , value )) => key ++ "=" ++ value )-> Array .join ("&" )
1175
1174
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 )
1178
1177
url
1179
1178
}
1180
1179
Original file line number Diff line number Diff line change @@ -48,6 +48,13 @@ module Window = {
48
48
@scope ("window" ) @val external innerWidth : int = "innerWidth"
49
49
@scope ("window" ) @val external innerHeight : int = "innerHeight"
50
50
@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
+ }
51
58
}
52
59
53
60
module Fetch = {
You can’t perform that action at this time.
0 commit comments