We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 867c071 commit 3feeff1Copy full SHA for 3feeff1
src/useDeviceOrientation.ts
@@ -14,10 +14,10 @@ export function useDeviceOrientation() {
14
const [orientation, setOrientation] = useState(initialState)
15
16
useEffect(() => {
17
- const onChange = ({screen: scr}: {screen: ScaledSize}) => {
+ const onChange = ({screen}: {screen: ScaledSize}) => {
18
setOrientation({
19
- portrait: isOrientationPortrait(scr),
20
- landscape: isOrientationLandscape(scr),
+ portrait: isOrientationPortrait(screen),
+ landscape: isOrientationLandscape(screen),
21
})
22
}
23
0 commit comments