Kantongku: splash screen (logo teal + background gradient)

This commit is contained in:
Bro
2026-08-16 16:02:24 +07:00
parent c5a853ae94
commit 6196b7cd61
5 changed files with 33 additions and 1 deletions
+4
View File
@@ -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<string | null>(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)));
}, []);