bae705aa97
- Add NFC ePassport roadmap (ICAO 9303, eIDAS) - Add TensorFlow.js edge face detection (BlazeFace) - Add structured audit logger (GDPR-compliant) - Risk scoring support Part of KYC Apple Native UX v1.1.0
91 lines
2.3 KiB
JavaScript
91 lines
2.3 KiB
JavaScript
/**
|
|
* AppNavigator
|
|
* Root navigation with tab and stack navigators
|
|
*/
|
|
|
|
import React from 'react';
|
|
import { NavigationContainer } from '@react-navigation/native';
|
|
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
|
|
import { createStackNavigator } from '@react-navigation/stack';
|
|
import Icon from 'react-native-vector-icons/MaterialIcons';
|
|
|
|
// Screens
|
|
import HomeScreen from '../screens/HomeScreen';
|
|
import StatsScreen from '../screens/StatsScreen';
|
|
import ProfileScreen from '../screens/ProfileScreen';
|
|
|
|
const Tab = createBottomTabNavigator();
|
|
const Stack = createStackNavigator();
|
|
|
|
// Home Stack
|
|
function HomeStack() {
|
|
return (
|
|
<Stack.Navigator screenOptions={{ headerShown: false }}>
|
|
<Stack.Screen name="HomeMain" component={HomeScreen} />
|
|
</Stack.Navigator>
|
|
);
|
|
}
|
|
|
|
// Main Tab Navigator
|
|
function MainTabs() {
|
|
return (
|
|
<Tab.Navigator
|
|
screenOptions={({ route }) => ({
|
|
headerShown: false,
|
|
tabBarStyle: {
|
|
backgroundColor: '#1C1C1E',
|
|
borderTopColor: '#2C2C2E',
|
|
paddingBottom: 8,
|
|
paddingTop: 8,
|
|
},
|
|
tabBarActiveTintColor: '#007AFF',
|
|
tabBarInactiveTintColor: '#8E8E93',
|
|
tabBarIcon: ({ focused, color, size }) => {
|
|
let iconName;
|
|
|
|
switch (route.name) {
|
|
case 'Home':
|
|
iconName = 'camera-alt';
|
|
break;
|
|
case 'Stats':
|
|
iconName = 'bar-chart';
|
|
break;
|
|
case 'Profile':
|
|
iconName = 'person';
|
|
break;
|
|
default:
|
|
iconName = 'circle';
|
|
}
|
|
|
|
return <Icon name={iconName} size={size} color={color} />;
|
|
},
|
|
})}
|
|
>
|
|
<Tab.Screen
|
|
name="Home"
|
|
component={HomeStack}
|
|
options={{ tabBarLabel: 'Capture' }}
|
|
/>
|
|
<Tab.Screen
|
|
name="Stats"
|
|
component={StatsScreen}
|
|
options={{ tabBarLabel: 'Stats' }}
|
|
/>
|
|
<Tab.Screen
|
|
name="Profile"
|
|
component={ProfileScreen}
|
|
options={{ tabBarLabel: 'Profile' }}
|
|
/>
|
|
</Tab.Navigator>
|
|
);
|
|
}
|
|
|
|
// Root Navigator
|
|
export default function AppNavigator() {
|
|
return (
|
|
<NavigationContainer>
|
|
<MainTabs />
|
|
</NavigationContainer>
|
|
);
|
|
}
|