-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
61 lines (57 loc) · 2 KB
/
App.js
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
52
53
54
55
56
57
58
59
60
61
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import { useState } from 'react'
import { NavigationContainer } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { useNavigation } from '@react-navigation/native';
import FeedScreen from './screens/FeedScreen';
import CameraScreen from './screens/CameraScreen';
import LeaderboardScreen from './screens/LeaderboardScreen';
import ProfileScreen from './screens/ProfileScreen';
const Tab = createBottomTabNavigator();
const Stack = createNativeStackNavigator();
export default function App() {
return (
<NavigationContainer>
<Stack.Navigator>
<Stack.Screen
name="MainTabs"
component={MainTabs} // Wrap the tab navigator inside a screen
options={{ headerShown: false }} // Hide header for tab navigator
/>
<Stack.Screen
name="ProfileScreen"
component={ProfileScreen}
options={{ headerShown: false }}
/>
</Stack.Navigator>
</NavigationContainer>
);
}
function MainTabs({ navigation }) {
return (
<Tab.Navigator
initialRouteName="Feed"
screenOptions={{
headerShown: false,
tabBarStyle: { backgroundColor: '#303030' },
tabBarActiveTintColor: '#8165FF',
tabBarInactiveTintColor: '#D0D0D0',
}}
>
<Tab.Screen
name="Feed"
component={FeedScreen}
/>
<Tab.Screen
name="Camera"
component={CameraScreen}
/>
<Tab.Screen
name="Leaderboard"
component={LeaderboardScreen}
/>
</Tab.Navigator>
);
}