generated from halilibrahimcelik/mobile-app-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.tsx
51 lines (49 loc) · 1.71 KB
/
App.tsx
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
45
46
47
48
49
50
51
import MainExpenseProvider from '@/providers/MainExpenseProvider';
import ThemePaperProvider from '@/providers/ThemePaperProvider';
import NavigationContainerWrapper from '@/routes/NavigationContainerWrapper';
import TabNavigator from '@/routes/TabNavigator';
import { ThemeProvider } from '@/theme/ThemeProvider';
import { StyleSheet, View } from 'react-native';
import 'react-native-get-random-values';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { RootStackParamList, STACK_NAMES } from '@/types';
import AuthProvider from '@/providers/AuthProvider';
import ProtectedScreen from '@/screens/ProtectedScreen';
export const Stack = createNativeStackNavigator<RootStackParamList>();
export default function App() {
return (
<>
<AuthProvider>
<ThemeProvider>
<MainExpenseProvider>
<ThemePaperProvider>
<View style={styles.container}>
<NavigationContainerWrapper>
<Stack.Navigator
screenOptions={{
headerShown: false,
}}
>
<Stack.Screen
name={STACK_NAMES.Home}
component={TabNavigator}
/>
<Stack.Screen
name={STACK_NAMES.AuthScreen}
component={ProtectedScreen}
/>
</Stack.Navigator>
</NavigationContainerWrapper>
</View>
</ThemePaperProvider>
</MainExpenseProvider>
</ThemeProvider>
</AuthProvider>
</>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
},
});