mirror of
https://github.com/movie-web/native-app.git
synced 2025-09-13 16:33:26 +00:00
fix: portrait orientation when tabs focused
This commit is contained in:
@@ -2,6 +2,7 @@ import { useRef } from "react";
|
||||
import { Platform, View } from "react-native";
|
||||
import * as Haptics from "expo-haptics";
|
||||
import { Tabs } from "expo-router";
|
||||
import * as ScreenOrientation from "expo-screen-orientation";
|
||||
|
||||
import Colors from "@movie-web/tailwind-config/colors";
|
||||
|
||||
@@ -29,6 +30,11 @@ export default function TabLayout() {
|
||||
break;
|
||||
}
|
||||
},
|
||||
focus: () => {
|
||||
void ScreenOrientation.lockAsync(
|
||||
ScreenOrientation.OrientationLock.PORTRAIT_UP,
|
||||
);
|
||||
},
|
||||
})}
|
||||
screenOptions={{
|
||||
headerShown: false,
|
||||
|
Reference in New Issue
Block a user