diff --git a/App.tsx b/App.tsx index ba1a22d..5ad0bca 100644 --- a/App.tsx +++ b/App.tsx @@ -1,4 +1,5 @@ import { StatusBar } from 'expo-status-bar'; +import * as SplashScreen from 'expo-splash-screen'; import { useEffect, useState } from 'react'; import { ActivityIndicator, StyleSheet, Text, View } from 'react-native'; import { SafeAreaProvider } from 'react-native-safe-area-context'; @@ -8,6 +9,8 @@ import { checkRecurringDue, getSetting } from './src/db/repositories'; import { RootNavigator } from './src/navigation'; import { colors } from './src/theme/colors'; +SplashScreen.preventAutoHideAsync().catch(() => {}); + export default function App() { const [ready, setReady] = useState(false); const [error, setError] = useState(null); @@ -25,6 +28,7 @@ export default function App() { const onboarded = await getSetting('onboarded'); setInitialRoute(onboarded === '1' ? 'Main' : 'Onboarding'); setReady(true); + SplashScreen.hideAsync().catch(() => {}); }) .catch((e) => setError(String(e))); }, []); diff --git a/app.json b/app.json index d7f340a..e5efa61 100644 --- a/app.json +++ b/app.json @@ -22,6 +22,18 @@ "web": { "favicon": "./assets/favicon.png" }, - "plugins": ["expo-sqlite", "expo-sharing"] + "plugins": [ + "expo-sqlite", + "expo-sharing", + [ + "expo-splash-screen", + { + "backgroundColor": "#0D9488", + "image": "./assets/splash-logo.png", + "imageWidth": 220, + "resizeMode": "contain" + } + ] + ] } } diff --git a/assets/splash-logo.png b/assets/splash-logo.png new file mode 100644 index 0000000..54e07d7 Binary files /dev/null and b/assets/splash-logo.png differ diff --git a/package-lock.json b/package-lock.json index 3647fca..3cde7ec 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,6 +18,7 @@ "expo-file-system": "~57.0.4", "expo-linear-gradient": "~57.0.1", "expo-sharing": "~57.0.12", + "expo-splash-screen": "~57.0.6", "expo-sqlite": "~57.0.1", "expo-status-bar": "~57.0.1", "react": "19.2.3", @@ -3064,6 +3065,20 @@ "react-native": "*" } }, + "node_modules/expo-splash-screen": { + "version": "57.0.6", + "resolved": "https://registry.npmjs.org/expo-splash-screen/-/expo-splash-screen-57.0.6.tgz", + "integrity": "sha512-FY0E7hMyXVAsNh18yGzIjdooPXdjafalEb6mk2EcqNPjXspHuu+pVEhUscEunw4wF8F/w6MOpT7UfOwHVWez9g==", + "license": "MIT", + "dependencies": { + "@expo/config-plugins": "~57.0.7", + "@expo/image-utils": "^0.11.4", + "xml2js": "0.6.0" + }, + "peerDependencies": { + "expo": "*" + } + }, "node_modules/expo-sqlite": { "version": "57.0.1", "resolved": "https://registry.npmjs.org/expo-sqlite/-/expo-sqlite-57.0.1.tgz", diff --git a/package.json b/package.json index ee1871b..d8c3264 100644 --- a/package.json +++ b/package.json @@ -13,6 +13,7 @@ "expo-file-system": "~57.0.4", "expo-linear-gradient": "~57.0.1", "expo-sharing": "~57.0.12", + "expo-splash-screen": "~57.0.6", "expo-sqlite": "~57.0.1", "expo-status-bar": "~57.0.1", "react": "19.2.3",