-
Notifications
You must be signed in to change notification settings - Fork 0
/
App.js
59 lines (50 loc) · 1.8 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
import React, { useState } from 'react';
import { View, StyleSheet, SafeAreaView, Pressable } from 'react-native';
import 'react-native-gesture-handler';
import HomeScreen from './src/screens/HomeScreen';
import MatchesScreen from './src/screens/MatchesScreen';
import Fontisto from 'react-native-vector-icons/Fontisto';
import MaterialCommunityIcons from 'react-native-vector-icons/MaterialCommunityIcons';
import Ionicons from 'react-native-vector-icons/Ionicons';
import FontAwesome from 'react-native-vector-icons/FontAwesome';
const App = () => {
const [activeScreen, setActiveScreen] = useState('HOME');
// change the theme later
const color = '#b5b5b5'
const activeColor = '#F76C6B'
return (
<SafeAreaView style={styles.root}>
<View style={styles.pageContainer}>
<View style={styles.topNavigation}>
<Pressable onPress={() => setActiveScreen('HOME')}>
<Fontisto name="tinder" size={32} color={activeScreen == 'HOME' ? activeColor : color} />
</Pressable>
<MaterialCommunityIcons name="star-four-points" size={32} color={color} />
<Pressable onPress={() => setActiveScreen('CHAT')}>
<Ionicons name="ios-chatbubbles" size={32} color={activeScreen == 'CHAT' ? activeColor : color} />
</Pressable>
<FontAwesome name="user" size={32} color={color} />
</View>
{activeScreen == 'HOME' && <HomeScreen />}
{activeScreen == 'CHAT' && <MatchesScreen />}
</View>
</SafeAreaView>
);
};
const styles = StyleSheet.create({
root: {
flex: 1,
},
pageContainer:{
justifyContent: 'center',
alignItems: 'center',
flex: 1,
},
topNavigation: {
flexDirection: 'row',
justifyContent: 'space-around',
width: '100%',
padding: 10,
},
});
export default App;