Build complete Expo/React Native mobile app with: - Auth flow: email/password login, registration, biometric auth - Dashboard: exposure summary, spam stats, voice protection status - DarkWatch: watch list management, exposure feed, alert toggles - SpamShield: call/text history, whitelist/blacklist management - VoicePrint: family member enrollment, voice analysis - Settings: tier management, notification preferences, security - Push notification integration via FCM/APNs - Offline-first state management with Zustand + AsyncStorage - Integration with @shieldai/mobile-api-client for API services - React Navigation with auth-aware routing (stack + bottom tabs) - Dark theme with consistent design system (colors, spacing, typography) - Network status monitoring and offline request queuing Co-Authored-By: Paperclip <noreply@paperclip.ing>
30 lines
1.0 KiB
TypeScript
30 lines
1.0 KiB
TypeScript
import React, { useEffect } from 'react';
|
|
import { StatusBar } from 'expo-status-bar';
|
|
import { NavigationContainer } from '@react-navigation/native';
|
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
import { useAuthStore } from '@/store/authStore';
|
|
import { AuthNavigator } from '@/navigation/AuthNavigator';
|
|
import { MainTabNavigator } from '@/navigation/MainTabNavigator';
|
|
import { usePushNotifications } from '@/hooks';
|
|
import '@/services/api';
|
|
|
|
export default function App() {
|
|
const { isAuthenticated } = useAuthStore();
|
|
const { registerForPushNotifications } = usePushNotifications();
|
|
|
|
useEffect(() => {
|
|
if (isAuthenticated) {
|
|
registerForPushNotifications();
|
|
}
|
|
}, [isAuthenticated, registerForPushNotifications]);
|
|
|
|
return (
|
|
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
<NavigationContainer>
|
|
<StatusBar style="light" />
|
|
{isAuthenticated ? <MainTabNavigator /> : <AuthNavigator />}
|
|
</NavigationContainer>
|
|
</GestureHandlerRootView>
|
|
);
|
|
}
|