feat(mobile): replace starter template with dashboard-driven app flow

This commit is contained in:
2026-03-07 10:20:00 +00:00
parent d03b22a99f
commit 64684eaae6
34 changed files with 4645 additions and 895 deletions

36
MobileApp/app/index.tsx Normal file
View File

@@ -0,0 +1,36 @@
import { Redirect } from 'expo-router';
import React from 'react';
import { ActivityIndicator, StyleSheet, View } from 'react-native';
import { useApp } from '@/src/app-context';
export default function IndexRoute() {
const { ready, state } = useApp();
if (!ready) {
return (
<View style={styles.loading}>
<ActivityIndicator color="#60a5fa" size="large" />
</View>
);
}
if (!state.session?.session) {
return <Redirect href={'/auth' as any} />;
}
if (!state.deviceToken) {
return <Redirect href={'/onboarding' as any} />;
}
return <Redirect href="/(tabs)" />;
}
const styles = StyleSheet.create({
loading: {
flex: 1,
backgroundColor: '#0a0a0c',
alignItems: 'center',
justifyContent: 'center',
},
});