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)));
}, []);
+13 -1
View File
@@ -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"
}
]
]
}
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 112 KiB

+15
View File
@@ -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",
+1
View File
@@ -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",