Skip to content

Commit

Permalink
fix: comments addressed
Browse files Browse the repository at this point in the history
  • Loading branch information
PritishBudhiraja committed Nov 6, 2024
1 parent 6208b7e commit 52a7603
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/Utilities/Utils.res
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
4 changes: 2 additions & 2 deletions src/Window.res
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit 52a7603

Please sign in to comment.