-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathHomeScreenMain.jsx
154 lines (130 loc) · 4.21 KB
/
HomeScreenMain.jsx
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
144
145
146
147
148
149
150
151
152
153
154
import React, { useState } from 'react';
import { View, Image, StyleSheet, Text, TouchableOpacity, ScrollView } from 'react-native';
import { Stack, useRouter } from 'expo-router';
import { profilePic, visaBanner, itiPlan } from '../assets/images/images_index';
import { Ionicons } from '@expo/vector-icons';
import { Colors } from 'react-native/Libraries/NewAppScreen';
import SearchBar from './SearchBar';
function Home() {
const router = useRouter();
const [searchText, setSearchText] = useState('');
const handleSearch = () => {
console.log('Searching for:', searchText);
};
return (
<View style={styles.container}>
<Stack.Screen
options={{
headerShown: false,
headerTransparent: true,
}}
/>
<ScrollView style={styles.scrollView}>
<View style={styles.header}>
<View style={styles.locationContainer}>
<Text style={styles.locationText}>Your location ▼</Text>
<View style={styles.locationInfo}>
<Text style={styles.countryText}>Sri Lanka</Text>
</View>
</View>
<View style={styles.headerRightContainer}>
<TouchableOpacity onPress={() => alert('Notifications clicked!')}>
<Ionicons name='notifications-outline' size={24} color={Colors.black} style={styles.icon} />
</TouchableOpacity>
<TouchableOpacity onPress={() => alert('Profile picture clicked!')}>
<Image source={profilePic} style={styles.profileImage} />
</TouchableOpacity>
</View>
</View>
<View style={styles.SearchBar}>
<SearchBar searchText={searchText} setSearchText={setSearchText} handleSearch={handleSearch} />
</View>
<View>
<TouchableOpacity onPress={() => alert("Visa Process")}>
<Image source={visaBanner} style={styles.visaBanner}/>
</TouchableOpacity>
</View>
<View style={{ flexDirection: 'row', alignItems: 'flex-start' }}>
<Image source={itiPlan} />
<View style={{ flex: 1, justifyContent: 'center' }}>
<Text style={{ fontSize: 20, fontWeight: 'bold', textAlign: 'center', lineHeight: 60 }}>
Ditch Generic Gateways
</Text>
<Text style={{ textAlign: 'center', lineHeight: 25, color: "gray" }}>Plan your tour effortlessly with our new</Text>
<View>
<Text style={{textAlign: 'center', color: "gray", lineHeight: 20}}>AI planner</Text>
</View>
<View style={{ flex: 1, justifyContent: 'center' }}>
<TouchableOpacity onPress={() => alert("Go to planning")} style={{backgroundColor: "purple", borderRadius: 15, padding: 10}}>
<Text style={{ fontSize: 16, fontWeight: 'bold', color: 'white', textAlign: 'center' }}>Start Planning</Text>
</TouchableOpacity>
</View>
</View>
</View>
</ScrollView>
</View>
);
}
const styles = StyleSheet.create({
container: {
flex: 1,
backgroundColor: '#FFFFF7',
},
scrollView: {
flex: 1,
},
header: {
backgroundColor: '#FFFFF7',
padding: 10,
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'flex-start',
},
profileImage: {
width: 40,
height: 40,
borderRadius: 20,
marginLeft: 10,
},
headerRightContainer: {
flexDirection: 'row',
alignItems: 'center',
},
icon: {
marginRight: 10,
},
locationContainer: {
flexDirection: 'column',
alignItems: 'flex-start',
},
locationText: {
fontSize: 16,
color: 'gray',
},
locationInfo: {
flexDirection: 'column',
alignItems: 'flex-start',
marginTop: 4,
},
caretMark: {
fontSize: 16,
color: 'gray'
},
countryText: {
fontSize: 16,
color: 'black',
fontWeight: 'bold',
},
visaBanner: {
width: 'max-width',
resizeMode: 'contain',
height: 250,
borderRadius: 10,
margin: 10,
},
SearchBar: {
width: '100%',
marginTop: 20,
}
});
export default Home;