-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathApp.js
More file actions
88 lines (81 loc) · 2.53 KB
/
Copy pathApp.js
File metadata and controls
88 lines (81 loc) · 2.53 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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View } from 'react-native';
import { Provider as PaperProvider } from 'react-native-paper';
import Home from './components/Home';
import Product from './components/Products';
import Cart from './components/Cart';
import Account from './components/Account';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import { NavigationContainer } from '@react-navigation/native';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import { LogBox } from 'react-native';
LogBox.ignoreLogs(['Warning: ...']); // Ignore log notification by message
LogBox.ignoreAllLogs();//Ignore all log notifications
function SettingsScreen() {
return (
<View style={{ flex: 1, justifyContent: 'center', alignItems: 'center' }}>
<Text>Settings!</Text>
</View>
);
}
const Tab = createBottomTabNavigator();
function MyTabs() {
return (
<Tab.Navigator tab>
<Tab.Screen name="Home" component={() => <Home />} options={{
headerShown: "",
tabBarLabel: 'หน้าหลัก',
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons name="home" color={color} size={26} />
),
}} />
<Tab.Screen name="Product" component={() => <Product />} options={{
headerShown: "",
tabBarLabel: 'สินค้า',
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons name="shopping" color={color} size={26} />
),
}} />
<Tab.Screen name="Cart" component={() => <Cart />} options={{
headerShown: "",
tabBarLabel: 'ตะกร้า',
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons name="cart" color={color} size={26} />
),
}} />
<Tab.Screen name="Account" component={() => <Account />} options={{
headerShown: "",
tabBarLabel: 'บัญชีของฉัน',
tabBarIcon: ({ color }) => (
<MaterialCommunityIcons name="cog" color={color} size={26} />
),
}} />
</Tab.Navigator>
);
}
export default function App() {
return (
<PaperProvider>
<View>
<StatusBar style="auto" />
</View>
<NavigationContainer>
<MyTabs />
</NavigationContainer>
</PaperProvider>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#fff',
alignItems: 'center',
justifyContent: 'center',
},
CardImg: {
padding: 20
},
test: {
padding: StatusBar.length
}
});