-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathRotas.js
143 lines (137 loc) · 4.45 KB
/
Rotas.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
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
import React from 'react';
import { View, Button, Text, Image, StyleSheet } from 'react-native';
import { NavigationContainer } from '@react-navigation/native';
import { createStackNavigator } from '@react-navigation/stack';
import { createMaterialTopTabNavigator } from '@react-navigation/material-top-tabs';
import { HeaderBackButton } from '@react-navigation/stack';
import { Octicons,Entypo,EvilIcons} from '@expo/vector-icons';
import 'react-native-gesture-handler';
import Chats from './view/Chats';
import Chat from './view/Chat';
import NewChat from './view/NewChat';
import Issues from './view/Issues';
import Repos from './view/Repos';
import Calendario from './view/Calendario'
import ReposSearch from './view/ReposSearch';
import ReposRotas from './view/Repo/RepoRotas'
import IssueSearch from './view/IssueSearch';
import Minha_Conta from './view/MyAccountList';
import MyProfile from './view/MyProfile';
import signOutAsync from './view/AfterLogin';
const Stack = createStackNavigator();
const Tab = createMaterialTopTabNavigator();
function TabStack() {
return (
<Tab.Navigator
initialRouteName="Chats"
tabBarOptions={{
activeTintColor: '#FFFFFF',
inactiveTintColor: '#F8F8F8',
style: {
backgroundColor: '#000000',
},
labelStyle: {
textAlign: 'center',
},
indicatorStyle: {
borderBottomColor: '#71e7f0',
borderBottomWidth: 2,
},
}}>
<Tab.Screen
name="Chats"
component={Chats}
options={{
tabBarLabel:({ color, size }) => <><Entypo name="chat" size={30} color={color} /><Text style={{color:'white', padding: 0}} >Chats</Text></>,
}}
/>
<Tab.Screen
name="Repositorios"
component={Repos}
options={{
tabBarLabel: ({ color, size }) => <><Octicons name="repo" size={30} color={color} /><Text style={{color:'white', padding: 0,marginLeft:-6}} >Repos</Text></>,
}}
/>
<Tab.Screen
name="Issues"
component={Issues}
options={{
tabBarLabel: ({ color, size }) => <><Octicons name="issue-opened" size={30} color={color} /><Text style={{color:'white', padding: 0,marginLeft:-5}} >Issues</Text></>,
}}
/>
<Tab.Screen
name="Minha Conta"
component={Minha_Conta}
options={{
tabBarLabel: ({ color, size }) => <><EvilIcons name="gear" size={30} color={color}/><Text style={{color:'white', padding: 0}} >Tools</Text></>,
}}
/>
</Tab.Navigator>
);
}
function Rotas() {
return (
<Stack.Navigator
initialRouteName="TabStack"
screenOptions={{
headerStyle: { backgroundColor: '#000000' },
headerTintColor: '#fff',
headerTitleStyle: { fontWeight: 'bold' },
}}>
<Stack.Screen
name="TabStack"
component={TabStack}
options={{ title: 'HubChat' }}
/>
<Stack.Screen name="NewChat" component={NewChat} headerMode="none" />
<Stack.Screen name="IssueSearch" component={IssueSearch} headerMode="none" />
<Stack.Screen name="Repositorio Search" component={ReposSearch} headerMode="none" />
<Stack.Screen name="RepoRotas" component={ReposRotas} options={{headerShown: false}} />
<Stack.Screen name="My Profile" component={MyProfile} options={{ title: 'Meu Perfil' }} />
<Stack.Screen name="Calendario" component={Calendario} />
<Stack.Screen
name="Chat"
component={Chat}
options={({ route }) => ({
headerTitle: (props) => (
<View style={styles.row} >
<Image source={{ uri: route.params.chat.profile_picture }} style={styles.pic} />
<View style={[styles.nameContainer,{}]}>
<Text
style={[styles.nameTxt,{}]}
numberOfLines={1}
ellipsizeMode="tail">
{route.params.chat.name}
</Text>
</View>
</View>
)
})}
/>
</Stack.Navigator>
);
}
const styles = StyleSheet.create({
row: {
flexDirection: 'row',
alignItems: 'center',
padding: 0,
},
nameContainer: {
flexDirection: 'row-reverse',
justifyContent: 'space-between',
},
nameTxt: {
paddingLeft:8 ,
fontWeight: '600',
color: 'white',
fontSize: 18,
},
pic: {
borderRadius: 30,
width: 40,
height: 40,
marginRight:8,
},
});
export default Rotas;