Loading mobile/src/hooks/useRotationEnabled.ts 0 → 100644 +14 −0 Original line number Diff line number Diff line import { useEffect } from "react"; import * as ScreenOrientation from "expo-screen-orientation"; export const useRotationEnabled = () => { useEffect(() => { const lock = async () => { await ScreenOrientation.unlockAsync(); }; lock(); return () => { ScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.PORTRAIT); }; }, []); }; Loading
mobile/src/hooks/useRotationEnabled.ts 0 → 100644 +14 −0 Original line number Diff line number Diff line import { useEffect } from "react"; import * as ScreenOrientation from "expo-screen-orientation"; export const useRotationEnabled = () => { useEffect(() => { const lock = async () => { await ScreenOrientation.unlockAsync(); }; lock(); return () => { ScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.PORTRAIT); }; }, []); };