diff --git a/App.tsx b/App.tsx index 5ad0bca..b16b8cd 100644 --- a/App.tsx +++ b/App.tsx @@ -1,20 +1,16 @@ 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'; import { NavigationContainer } from '@react-navigation/native'; import { initDatabase } from './src/db/database'; -import { checkRecurringDue, getSetting } from './src/db/repositories'; +import { checkRecurringDue } 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); - const [initialRoute, setInitialRoute] = useState<'Main' | 'Onboarding'>('Onboarding'); useEffect(() => { initDatabase() @@ -25,10 +21,7 @@ export default function App() { } catch { // jangan sampai mengganggu startup } - const onboarded = await getSetting('onboarded'); - setInitialRoute(onboarded === '1' ? 'Main' : 'Onboarding'); setReady(true); - SplashScreen.hideAsync().catch(() => {}); }) .catch((e) => setError(String(e))); }, []); @@ -54,7 +47,7 @@ export default function App() { return ( - + diff --git a/app.json b/app.json index e5efa61..a4d68ff 100644 --- a/app.json +++ b/app.json @@ -24,16 +24,7 @@ }, "plugins": [ "expo-sqlite", - "expo-sharing", - [ - "expo-splash-screen", - { - "backgroundColor": "#0D9488", - "image": "./assets/splash-logo.png", - "imageWidth": 220, - "resizeMode": "contain" - } - ] + "expo-sharing" ] } } diff --git a/assets/splash-logo.png b/assets/splash-logo.png deleted file mode 100644 index 54e07d7..0000000 Binary files a/assets/splash-logo.png and /dev/null differ diff --git a/package-lock.json b/package-lock.json index 3cde7ec..3647fca 100644 --- a/package-lock.json +++ b/package-lock.json @@ -18,7 +18,6 @@ "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", @@ -3065,20 +3064,6 @@ "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 d8c3264..ee1871b 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,6 @@ "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", diff --git a/src/navigation/index.tsx b/src/navigation/index.tsx index eb68061..2d15895 100644 --- a/src/navigation/index.tsx +++ b/src/navigation/index.tsx @@ -10,7 +10,6 @@ import { EditTransactionScreen } from '../screens/EditTransactionScreen'; import { RecurringFormScreen } from '../screens/RecurringFormScreen'; import { TargetFormScreen } from '../screens/TargetFormScreen'; import { CategoryFormScreen } from '../screens/CategoryFormScreen'; -import { OnboardingScreen } from '../screens/OnboardingScreen'; import { SavingsScreen } from '../screens/SavingsScreen'; import { SettingsScreen } from '../screens/SettingsScreen'; import type { TransactionType } from '../types'; @@ -25,7 +24,6 @@ export type RootTabParamList = { export type RootStackParamList = { Main: undefined; - Onboarding: undefined; EditTransaksi: { transactionId: number }; RecurringForm: undefined; TargetForm: undefined; @@ -134,18 +132,10 @@ function MainTabs() { ); } -export function RootNavigator({ - initialRoute = 'Main', -}: { - initialRoute?: 'Main' | 'Onboarding'; -}) { +export function RootNavigator() { return ( - + - >(); - - const handleStart = async () => { - await setSetting('onboarded', '1'); - navigation.replace('Main'); - }; - - return ( - - - - - - - Kantongku - - Asisten keuangan pribadi yang bikin kamu semangat menabung. - - - - - {FEATURES.map((f) => ( - - - - - - {f.title} - {f.desc} - - - ))} - - - [styles.startBtn, pressed && styles.pressed]} - onPress={handleStart} - > - - Mulai Pakai Kantongku - - - - Kategori bisa diatur kapan saja di menu Pengaturan. - - - - ); -} - -const styles = StyleSheet.create({ - safe: { flex: 1, backgroundColor: colors.background }, - content: { paddingBottom: 32 }, - hero: { - marginHorizontal: 16, - marginTop: 16, - borderRadius: 24, - padding: 24, - overflow: 'hidden', - alignItems: 'center', - shadowColor: colors.primaryDark, - shadowOpacity: 0.25, - shadowRadius: 12, - shadowOffset: { width: 0, height: 6 }, - elevation: 6, - }, - ornCircleLarge: { - position: 'absolute', - right: -40, - top: -50, - width: 160, - height: 160, - borderRadius: 80, - backgroundColor: 'rgba(255,255,255,0.07)', - }, - ornCircleSmall: { - position: 'absolute', - left: -30, - bottom: -40, - width: 110, - height: 110, - borderRadius: 55, - backgroundColor: 'rgba(255,255,255,0.06)', - }, - logo: { width: 84, height: 84, marginBottom: 10 }, - heroTitle: { - fontSize: 26, - fontWeight: '800', - color: colors.white, - }, - heroSub: { - fontSize: 13, - color: 'rgba(255,255,255,0.9)', - textAlign: 'center', - lineHeight: 19, - marginTop: 6, - }, - featureList: { marginHorizontal: 16, marginTop: 20, gap: 4 }, - featureRow: { - flexDirection: 'row', - alignItems: 'center', - backgroundColor: colors.surface, - borderWidth: 1, - borderColor: colors.border, - borderRadius: 16, - padding: 14, - marginBottom: 8, - }, - featureIcon: { - width: 40, - height: 40, - borderRadius: 20, - backgroundColor: colors.primarySoft, - alignItems: 'center', - justifyContent: 'center', - marginRight: 12, - }, - featureInfo: { flex: 1 }, - featureTitle: { fontSize: 14, fontWeight: '700', color: colors.text }, - featureDesc: { fontSize: 12, color: colors.textMuted, marginTop: 2, lineHeight: 17 }, - startBtn: { - marginHorizontal: 16, - marginTop: 20, - borderRadius: 14, - shadowColor: colors.primaryDark, - shadowOpacity: 0.25, - shadowRadius: 8, - shadowOffset: { width: 0, height: 4 }, - elevation: 4, - }, - startGradient: { - borderRadius: 14, - paddingVertical: 16, - alignItems: 'center', - }, - startText: { color: colors.white, fontWeight: '800', fontSize: 16 }, - footerNote: { - fontSize: 11, - color: colors.textMuted, - textAlign: 'center', - marginTop: 10, - }, - pressed: { opacity: 0.85 }, -});