-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
44 lines (40 loc) · 1.59 KB
/
App.js
File metadata and controls
44 lines (40 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
import 'react-native-gesture-handler';
import React from 'react';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { LogBox } from 'react-native';
import { AuthProvider } from './src/context/AuthContext'; // Add this import
// Suppress "topInsetsChange" error
LogBox.ignoreLogs([
'Unsupported top level event type "topInsetsChange" dispatched',
'Non-serializable values were found',
'VirtualizedLists should never be nested'
]);
// Import screens
import LoginScreen from './src/screens/LoginScreen';
import RegisterScreen from './src/screens/RegisterScreen';
import ForgotPasswordScreen from './src/screens/ForgotPasswordScreen';
import MainTabNavigator from './src/navigation/MainTabNavigator';
const Stack = createStackNavigator();
export default function App() {
return (
<SafeAreaProvider>
<AuthProvider> {/* Add AuthProvider here */}
<NavigationContainer>
<Stack.Navigator
screenOptions={{
headerShown: false,
cardStyle: { backgroundColor: '#F3F4F6' }
}}
>
<Stack.Screen name="MainTabs" component={MainTabNavigator} />
<Stack.Screen name="Login" component={LoginScreen} />
<Stack.Screen name="Register" component={RegisterScreen} />
<Stack.Screen name="ForgotPassword" component={ForgotPasswordScreen} />
</Stack.Navigator>
</NavigationContainer>
</AuthProvider>
</SafeAreaProvider>
);
}