Skip to content

Commit

Permalink
fix: downgrade sdk
Browse files Browse the repository at this point in the history
  • Loading branch information
obeim committed Jan 27, 2024
1 parent 0a2ccc0 commit 1a076ce
Show file tree
Hide file tree
Showing 9 changed files with 5,422 additions and 3,356 deletions.
3 changes: 2 additions & 1 deletion app.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@
},
"plugins": ["expo-router"],
"experiments": {
"typedRoutes": true
"typedRoutes": true,
"tsconfigPaths": true
},
"jsEngine": "hermes",
"extra": {
Expand Down
16 changes: 8 additions & 8 deletions app/_layout.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useCallback, type ReactNode, useEffect } from "react";
import { useCallback, type ReactNode } from "react";
import { Slot, SplashScreen } from "expo-router";
import { SafeAreaView, StatusBar, StyleSheet, I18nManager } from "react-native";
import { useFonts } from "expo-font";
Expand All @@ -17,26 +17,26 @@ export default function RootLayout(): ReactNode {

const onLayoutRootView = useCallback(async () => {
await openDatabase();

I18nManager.allowRTL(true);
I18nManager.forceRTL(true);

if (!I18nManager.isRTL) Updates.reloadAsync();

if (fontsLoaded || fontError) {
await SplashScreen.hideAsync();
SplashScreen.hideAsync();
}
}, [fontsLoaded, fontError]);

if (!fontsLoaded && !fontError) {
return null;
}
useEffect(() => {
onLayoutRootView();
}, []);

return (
<SafeAreaView style={styles.container}>
<SafeAreaView
onLayout={() => {
onLayoutRootView();
}}
style={styles.container}
>
<Slot />
</SafeAreaView>
);
Expand Down
2 changes: 1 addition & 1 deletion babel.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ module.exports = function (api) {
api.cache(true);
return {
presets: ["babel-preset-expo"],
plugins: ["nativewind/babel"],
plugins: ["nativewind/babel", "expo-router/babel"],
};
};
1 change: 1 addition & 0 deletions main.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
import "expo-router/entry";
Loading

0 comments on commit 1a076ce

Please sign in to comment.