-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathApp.tsx
66 lines (61 loc) · 1.69 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
import {NavigationContainer} from '@react-navigation/native';
import {createNativeStackNavigator} from '@react-navigation/native-stack';
import {createMaterialTopTabNavigator} from '@react-navigation/material-top-tabs';
import {Text} from 'react-native';
import React from 'react';
const Stack = createNativeStackNavigator();
const Tab = createMaterialTopTabNavigator();
import ChatUI from './screens/chatsui/app';
function TabsStack() {
return (
<Tab.Navigator
initialRouteName="SplashScreenUI"
screenOptions={{headerShown: false}}>
<Tab.Screen
name="SplashScreenUI"
component={ChatUI}
options={{title: () => <Text>All Chats</Text>}}
/>
<Tab.Screen
name="Unreads"
component={ChatUI}
options={{title: () => <Text>Unreads</Text>}}
/>
<Tab.Screen
name="Personals"
component={ChatUI}
options={{title: () => <Text>Personals</Text>}}
/>
<Tab.Screen
name="Groups"
component={ChatUI}
options={{title: () => <Text>Groups</Text>}}
/>
<Tab.Screen
name="SuperGroups"
component={ChatUI}
options={{title: () => <Text>SuperGP</Text>}}
/>
</Tab.Navigator>
);
}
const App = () => {
return (
<NavigationContainer>
<Stack.Navigator initialRouteName="MainPage">
<Stack.Screen
name="MainPage"
component={TabsStack}
options={{
headerTitle: () => (
<Text style={{fontWeight: 'bold', fontSize: 22}}>
Telegram UI
</Text>
),
}}
/>
</Stack.Navigator>
</NavigationContainer>
);
};
export default App;