From 52a76030cb6f3f87e72d1f20e62405d0d4f0f697 Mon Sep 17 00:00:00 2001 From: Pritish Budhiraja Date: Wed, 6 Nov 2024 11:20:43 +0530 Subject: [PATCH] fix: comments addressed --- src/Utilities/Utils.res | 2 +- src/Window.res | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) 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"