Skip to content

Commit daf3049

Browse files
committed
fix(example-app): ✨ add sharp-cli for bundling images on web
& add screen orientation lock for mobile
1 parent 22af9f5 commit daf3049

File tree

3 files changed

+222
-10
lines changed

3 files changed

+222
-10
lines changed

example/package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
"@react-navigation/drawer": "^6.5.3",
1515
"@react-navigation/native": "^6.0.16",
1616
"expo": "^47.0.0",
17+
"expo-screen-orientation": "^5.0.1",
1718
"expo-splash-screen": "~0.17.5",
1819
"expo-status-bar": "~1.4.2",
1920
"react": "18.1.0",
@@ -26,6 +27,7 @@
2627
"react-native-screens": "~3.18.0",
2728
"react-native-svg": "13.4.0",
2829
"react-native-web": "~0.18.9",
30+
"sharp-cli": "^4.1.0",
2931
"twrnc": "3.4.1"
3032
},
3133
"devDependencies": {

example/src/App.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,11 +5,13 @@ import { SafeAreaProvider } from "react-native-safe-area-context";
55
import { AdaptUIProvider, Box } from "@adaptui/react-native-tailwind";
66
import { NavigationContainer } from "@react-navigation/native";
77
import { useFonts } from "expo-font";
8+
import * as ScreenOrientation from "expo-screen-orientation";
89
import * as SplashScreen from "expo-splash-screen";
910
import tailwind from "twrnc";
1011

1112
import AppRoot from "./AppRoot";
1213

14+
ScreenOrientation.lockAsync(ScreenOrientation.OrientationLock.PORTRAIT_UP);
1315
LogBox.ignoreAllLogs();
1416

1517
const AdaptUIApp = () => {

0 commit comments

Comments
 (0)