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