2022-05-09 10:21:05 -07:00
|
|
|
import React, {useState, useEffect} from 'react';
|
|
|
|
import {
|
|
|
|
StatusBar,
|
|
|
|
StyleSheet,
|
|
|
|
Text,
|
|
|
|
View,
|
|
|
|
TouchableHighlight,
|
|
|
|
ScrollView,
|
|
|
|
Dimensions,
|
|
|
|
TouchableOpacity,
|
2022-05-14 09:26:15 -07:00
|
|
|
FlatList,
|
2022-05-09 10:21:05 -07:00
|
|
|
} from 'react-native';
|
|
|
|
import {Icon} from 'react-native-elements';
|
2022-05-14 09:26:15 -07:00
|
|
|
import HouseCard from './helpers/HouseCard'
|
2022-05-09 10:21:05 -07:00
|
|
|
|
2022-05-14 09:26:15 -07:00
|
|
|
const deviceWidth = Math.round(Dimensions.get('window').width);
|
|
|
|
|
|
|
|
const homes = [
|
|
|
|
{
|
|
|
|
name: 'Prestiage Villas',
|
|
|
|
categories: 'Desserts, Cakes and Bakery',
|
|
|
|
deliveryTime: '35 min',
|
|
|
|
distance: '3.7 km',
|
|
|
|
image: require('../assets/house_1.jpg'),
|
|
|
|
id: 1,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'lakeView Apartment 203',
|
|
|
|
categories: 'Beverages, Desserts, Cakes and Bakery',
|
|
|
|
deliveryTime: '45 min',
|
|
|
|
distance: '4.3 km',
|
|
|
|
image: require('../assets/house_2.jpg'),
|
|
|
|
id: 2,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'Central Villas',
|
|
|
|
categories: 'Cakes and Bakery, American, Sandwiches, Burgers',
|
|
|
|
deliveryTime: '25 min',
|
|
|
|
distance: '3 km',
|
|
|
|
image: require('../assets/house_1.jpg'),
|
|
|
|
id: 3,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: "grand flat 405",
|
|
|
|
categories: 'Fast Food, Burgers, Desserts',
|
|
|
|
deliveryTime: '20 min',
|
|
|
|
distance: '2.5 km',
|
|
|
|
image: require('../assets/house_2.jpg'),
|
|
|
|
id: 4,
|
|
|
|
},
|
|
|
|
{
|
|
|
|
name: 'exlusive villa',
|
|
|
|
categories: 'Fast Food, Burgers, Desserts',
|
|
|
|
deliveryTime: '25 min',
|
|
|
|
distance: '3.1 km',
|
|
|
|
image: require('../assets/house_1.jpg'),
|
|
|
|
id: 5,
|
|
|
|
},
|
|
|
|
];
|
|
|
|
const UserProfile = ({navigation}) => {
|
2022-05-09 10:21:05 -07:00
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<StatusBar backgroundColor="#ffffff" barStyle="dark-content" />
|
|
|
|
<View style={styles.viewRoot}>
|
2022-05-14 09:26:15 -07:00
|
|
|
<View style={styles.iconContainer}>
|
2022-05-09 10:21:05 -07:00
|
|
|
<TouchableHighlight
|
|
|
|
onPress={() => navigation.goBack()}
|
|
|
|
style={{activeOpacity: 1, underlayColor: 'red', color: 'white'}}>
|
|
|
|
<Icon name="arrow-back" type="ionicon" size={36} color="#206ba5" />
|
|
|
|
</TouchableHighlight>
|
2022-05-14 09:26:15 -07:00
|
|
|
<TouchableHighlight
|
|
|
|
onPress={() => navigation.goBack()}
|
|
|
|
style={{activeOpacity: 1, underlayColor: 'red', color: 'white'}}>
|
|
|
|
<Icon name="settings-outline" type="ionicon" size={36} color="#206ba5" />
|
|
|
|
</TouchableHighlight>
|
|
|
|
</View>
|
|
|
|
<View style={styles.headingContainer}>
|
|
|
|
<Text style={styles.heading}>John Doe</Text>
|
|
|
|
<Text style={styles.subHeading}>Tenant</Text>
|
|
|
|
|
|
|
|
<View style={{flexDirection: 'row', marginTop: 30}}>
|
|
|
|
<Icon name="card-outline" type="ionicon" size={36} color="brown" />
|
|
|
|
<Text style={[styles.pricingHeading]}>Basic Member</Text>
|
|
|
|
</View>
|
|
|
|
</View>
|
|
|
|
<View style={styles.cardContainer}>
|
|
|
|
{/* <Card /> */}
|
|
|
|
<StatusBar barStyle="dark-content" />
|
|
|
|
|
|
|
|
<FlatList
|
|
|
|
data={homes}
|
|
|
|
renderItem={({item}) => {
|
|
|
|
return <HouseCard info={item} />;
|
|
|
|
}}
|
|
|
|
keyExtractor={restaurant => restaurant.id.toString()}
|
|
|
|
showsVerticalScrollIndicator={false}
|
|
|
|
/>
|
2022-05-09 10:21:05 -07:00
|
|
|
</View>
|
|
|
|
</View>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
};
|
|
|
|
const styles = StyleSheet.create({
|
|
|
|
viewRoot: {
|
|
|
|
backgroundColor: '#ffffff',
|
|
|
|
justifyContent: 'center',
|
|
|
|
height: '100%',
|
|
|
|
flex: 1,
|
|
|
|
},
|
2022-05-14 09:26:15 -07:00
|
|
|
iconContainer: {
|
|
|
|
width: deviceWidth,
|
|
|
|
height: 60,
|
|
|
|
backgroundColor: 'white',
|
|
|
|
justifyContent: 'space-between',
|
|
|
|
paddingBottom: 20,
|
|
|
|
paddingLeft: 5,
|
|
|
|
paddingRight: 5,
|
|
|
|
flexDirection: 'row',
|
|
|
|
},
|
|
|
|
labelStyle: {
|
|
|
|
fontSize: 24,
|
|
|
|
fontWeight: '700',
|
|
|
|
},
|
|
|
|
headingContainer: {
|
|
|
|
|
|
|
|
marginLeft: 20,
|
|
|
|
},
|
2022-05-09 10:21:05 -07:00
|
|
|
heading: {
|
|
|
|
color: '#1C254E',
|
|
|
|
fontSize: 60,
|
2022-05-14 09:26:15 -07:00
|
|
|
textAlign: 'left',
|
2022-05-09 10:21:05 -07:00
|
|
|
fontFamily: 'Ubuntu-Bold',
|
|
|
|
},
|
2022-05-14 09:26:15 -07:00
|
|
|
subHeading: {
|
|
|
|
color: '#1C254E',
|
|
|
|
fontSize: 30,
|
|
|
|
textAlign: 'left',
|
|
|
|
fontFamily: 'Ubuntu-Regular',
|
|
|
|
},
|
|
|
|
pricingHeading: {
|
|
|
|
color: 'brown',
|
|
|
|
fontSize: 30,
|
|
|
|
textAlign: 'left',
|
|
|
|
fontFamily: 'Ubuntu-Regular',
|
|
|
|
paddingLeft: 10,
|
|
|
|
},
|
2022-05-09 10:21:05 -07:00
|
|
|
icon: {
|
|
|
|
alignSelf: 'flex-start',
|
|
|
|
marginLeft: '28%',
|
|
|
|
flexDirection: 'row',
|
|
|
|
},
|
2022-05-14 09:26:15 -07:00
|
|
|
cardContainer: {
|
|
|
|
flex: 1,
|
|
|
|
backgroundColor: 'white',
|
2022-05-09 10:21:05 -07:00
|
|
|
alignItems: 'center',
|
2022-05-14 09:26:15 -07:00
|
|
|
// justifyContent: 'center',
|
2022-05-09 10:21:05 -07:00
|
|
|
},
|
|
|
|
});
|
|
|
|
|
|
|
|
export default UserProfile;
|