封印2
This commit is contained in:
parent
c3ce82f978
commit
c9ebec0837
@ -22,14 +22,14 @@ export const DeviceOrientationChangeProvider = ({ children }) => {
|
|||||||
//ScreenOrientation.unlockAsync();
|
//ScreenOrientation.unlockAsync();
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
useEffect(() => {
|
// useEffect(() => {
|
||||||
if (height / width > 1.5) {
|
// if (height / width > 1.5) {
|
||||||
setIsLandscape(false);
|
// setIsLandscape(false);
|
||||||
}
|
// }
|
||||||
if (height / width < 1.5) {
|
// if (height / width < 1.5) {
|
||||||
setIsLandscape(true);
|
// setIsLandscape(true);
|
||||||
}
|
// }
|
||||||
}, [height, width]);
|
// }, [height, width]);
|
||||||
return (
|
return (
|
||||||
<DeviceOrientationChange.Provider value={{ isLandscape, setIsLandscape }}>
|
<DeviceOrientationChange.Provider value={{ isLandscape, setIsLandscape }}>
|
||||||
{children}
|
{children}
|
||||||
|
Loading…
Reference in New Issue
Block a user