diff --git a/src/Utilities/Utils.res b/src/Utilities/Utils.res index ebc79bcc..bdbf29a0 100644 --- a/src/Utilities/Utils.res +++ b/src/Utilities/Utils.res @@ -257,7 +257,7 @@ let useWindowSize = () => { let (size, setSize) = React.useState(_ => (0, 0)) React.useLayoutEffect1(() => { let updateSize = () => { - setSize(_ => (Window.windowInnerWidth, Window.windowInnerHeight)) + setSize(_ => (Window.innerWidth, Window.innerHeight)) } Window.addEventListener("resize", updateSize) updateSize() diff --git a/src/Window.res b/src/Window.res index 832417e4..f2a17a76 100644 --- a/src/Window.res +++ b/src/Window.res @@ -19,8 +19,8 @@ type packageJson = {version: string} /* External Declarations */ @val external window: window = "window" -@val @scope("window") external windowInnerHeight: int = "innerHeight" -@val @scope("window") external windowInnerWidth: int = "innerWidth" +@val @scope("window") external innerHeight: int = "innerHeight" +@val @scope("window") external innerWidth: int = "innerWidth" @val @scope("window") external windowParent: window = "parent" @val external parent: window = "parent" @val @scope("document") external createElement: string => Dom.element = "createElement"