forked from shujakhalid19/Ecommerce
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathApp.js
94 lines (79 loc) · 2.46 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
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
89
90
91
92
93
94
//initial flow
import { StatusBar } from 'expo-status-bar';
import { useEffect, useState } from 'react';
import {Platform, SafeAreaView, View, Text, ScrollView, Image, TextInput, StyleSheet} from 'react-native';
import Icon from '@expo/vector-icons/Ionicons'
import { NavigationContainer, DefaultTheme } from '@react-navigation/native';
import { createBottomTabNavigator } from '@react-navigation/bottom-tabs';
import Home from './src/screens/home.js';
import Shop from './src/screens/shop.js';
import Saved from './src/screens/saved.js';
import Profile from './src/screens/profile.js';
import AccountStacks from './src/stacks/accountArena.js';
const Tab=createBottomTabNavigator();
const MyTabs=()=>{
return(
<Tab.Navigator initialRouteName="Profile"
screenOptions={{
headerShown:false,
}}
>
<Tab.Screen name="Home" component={Home}
options={{
tabBarIcon: ({ color }) => (
<Icon name="home" color={color} size={20} />
)
}}
/>
<Tab.Screen name="Shop" component={Shop}
options={{
tabBarIcon: ({ color }) => (
<Icon name="grid-outline" color={color} size={20} />
)
}}
/>
<Tab.Screen name="Saved" component={Saved}
options={{
tabBarIcon: ({ color }) => (
<Icon name="heart-outline" color={color} size={20} />
)
}}
/>
<Tab.Screen name="Profile"
options={{
tabBarIcon: ({ color }) => (
<Icon name="person-circle-outline" color={color} size={20} />
),
headerShown:false,
headerTitle:'Account'
}}>
{(props)=><AccountStacks {...props} />}
</Tab.Screen>
</Tab.Navigator>
)
}
const MyTheme = {
...DefaultTheme,
colors: {
...DefaultTheme.colors,
background: '#ffffff'
},
};
export default function App() {
return (
<SafeAreaView style={[s.fl1,Platform.OS === 'android' && s.mgtp30]}>
<NavigationContainer theme={MyTheme} >
<MyTabs />
</NavigationContainer>
<StatusBar style="auto" />
</SafeAreaView>
);
}
const s=StyleSheet.create({
fl1:{flex:1},
mgtp30:{marginTop:30}
})
{/* <SafeAreaView style={[s.fl1]}>
<Text>Hekki</Text>
<StatusBar style="auto" />
</SafeAreaView> */}