import 'react-native-gesture-handler';
import * as React from 'react';
import { useState } from 'react';
import { Alert, Button, Image, StyleSheet, Dimensions, SafeAreaView, ScrollView, TouchableOpacity, Modal, Pressable, Share } from 'react-native';
import Constants from 'expo-constants';
import { Ionicons, FontAwesome } from '@expo/vector-icons';
import { LinearGradient } from 'expo-linear-gradient';
import { PolicyFooter, Social, ShowroomList, FooterInfo } from '../components/footer/footerMain';
import EditScreenInfo from '../components/EditScreenInfo';
import { Text, View, } from '../components/Themed';
import useColorScheme from '../hooks/useColorScheme';
import { TextInput } from 'react-native-gesture-handler';
import { RadioButton, Checkbox } from 'react-native-paper';
import { Picker } from '@react-native-picker/picker';
import { ArticleItem } from '../components/article/ArticleItem';
import { ShowProductItemSave } from '../components/product/productItem';
export default function AccountHome() {
return (
Trang chủ
Tài khoản của bạn
Tài khoản
Hurasoft test
Bạn đang ở trang tài khoản. Vui lòng chọn XEM THÔNG TIN để xem các mục.
)
}
const MenuAccount = () => {
const [showMenuAccount, setShowMenuAccount] = useState(true)
return (
setShowMenuAccount(!showMenuAccount)}>
Xem thông tin
Thông tin tài khoản
Quản lý đơn hàng
Sản phẩm đã xem
Sản phẩm đã lưu
Sản phẩm bạn đã đánh giá
Sản phẩm bạn đã thích
Thay đổi mật khẩu
Logout
)
}
const CustommerInfo = () => {
return (
Thông tin tài khoản
Họ tên: Hurasoft Test
Giới tính: Nữ
Email: test@mail.com
Địa chỉ: 30 Nguyên Hồng - Láng Hạ - Đống Đa - HN
Tỉnh/Thành phố: Hà Nội
Số điện thoại: 0912345678
Chỉnh sửa thông tin cá nhân
)
}
const CustommerInfoChange = () => {
const [selectedProvince, setSelectedProvince] = useState();
const [checked, setChecked] = React.useState('male');
return (
Cập nhật thông tin cá nhân
Họ tên
Giới tính
Nam
setChecked('male')} />
Nữ
setChecked('female')} />
Địa chỉ email
Địa chỉ nhà
Tỉnh/TP
setSelectedProvince(itemValue)
}
>
Điện thoại cố định
Điện thoại di động
Thay đổi
)
}
const productData = [
{
id: 1,
productName: 'Laptop LG Gram 14ZD90N-V.AX55A5 (i5 1035G7/8GB RAM/512GBSSD/14.0 inch FHD/FP/Xám Bạc) (model 2020)',
productSKU: 'TESTSKU',
productImage: {
small: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
medium: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
large: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
original: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
},
price: 30000000,
marketPrice: 50000000,
quantity: 1,
summary: 'CPU: Intel Core i5 1035G1\nRAM: 8GB\nỔ cứng: 256GB SSD\nMàn hình: 15.6 inch FHD\nHĐH: Win 10\nMàu: Đen'
},
{
id: 2,
productName: 'Laptop LG Gram 14ZD90N-V.AX55A5 (i5 1035G7/8GB RAM/512GBSSD/14.0 inch FHD/FP/Xám Bạc) (model 2020)',
productSKU: 'TESTSKU',
productImage: {
small: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
medium: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
large: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
original: 'https://hanoicomputercdn.com/media/product/120_52019_14zd90n_v_ax55a5.png',
},
price: 25000000,
marketPrice: 50000000,
quantity: 0,
summary: 'CPU: Intel Core i5 1035G1\nRAM: 8GB\nỔ cứng: 256GB SSD\nMàn hình: 15.6 inch FHD\nHĐH: Win 10\nMàu: Đen'
},
]
const ProductSave = () => {
const itemProductStyle = {
width: '100%',
borderBottomWidth: 1,
borderBottomColor: '#e8e8e8',
position: 'relative',
}
return (
Sản phẩm mua sau
{
productData.map(item => )
}
)
}
const ProductFavorite = () => {
const itemProductStyle = {
width: '100%',
borderBottomWidth: 1,
borderBottomColor: '#e8e8e8',
position: 'relative',
}
return (
Sản phẩm Bạn đã thích
{
productData.map(item => )
}
)
}
const winWidth = Dimensions.get('window').width; //full width
const winHeight = Dimensions.get('window').height; //full height
const winWidthP10 = winWidth - 20;
const halfWinWidth = winWidth / 2;
const ratio = winWidthP10 / 850; //541 is actual image width
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#fff',
},
brecrumb: {
display: 'flex',
width: winWidth,
paddingLeft: 10,
paddingRight: 10,
flexDirection: 'row',
height: 18,
alignItems: 'center',
marginTop: 10,
marginBottom: 10,
},
brecrumbText: {
fontSize: 13,
color: '#222',
},
brecrumbTextLast: {
fontSize: 13,
color: '#b7b7b7',
},
brecrumbIcon: {
fontSize: 13,
color: '#222',
marginLeft: 6,
marginRight: 6
},
accountBox: {
marginBottom: 20,
width: winWidth,
paddingHorizontal: 10,
},
accountBoxHeader: {
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'space-between',
marginBottom: 20,
},
accountBoxHeaderIcon: {
width: 60,
height: 60,
borderRadius: 30,
overflow: 'hidden',
backgroundColor: '#008445',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
marginRight: 20,
},
accountBoxHeaderIconFont: {
fontSize: 40,
color: '#fff',
lineHeight: 40,
},
accountBoxHeaderInfo: {
width: winWidthP10 - 80,
},
accountBoxHeaderInfoText: {
marginBottom: 10,
},
accountBoxHeaderInfoName: {
fontSize: 16,
textTransform: 'uppercase',
fontWeight: 'bold'
},
accountBoxSelec: {
marginBottom: 20,
},
accountBoxSelecBox: {
borderRadius: 3,
borderWidth: 1,
borderColor: '#999',
paddingHorizontal: 10,
height: 40,
flexDirection: 'row',
justifyContent: 'space-between',
alignItems: 'center',
},
accountBoxSelecBoxText: {
textTransform: 'uppercase',
fontWeight: 'bold',
},
accountBoxSelecBoxIcon: {},
accountBoxSelecList: {
width: '100%',
borderRadius: 3,
borderWidth: 1,
borderColor: '#999',
display: 'none',
},
active: {
display: 'flex',
},
accountNameTab: {
padding: 10,
flexDirection: 'row',
alignItems: 'center',
},
accountNameTabIcon: {
fontSize: 24,
color: '#7b7b7b',
marginRight: 8,
},
accountNameTabText: {},
accountBoxContent: {},
accountBoxTextHome: {},
custommerInfo: {
},
custommerInfoItemHeader: {
marginBottom: 10,
fontWeight: 'bold',
},
custommerInfoItem: {
marginBottom: 10,
},
custommerInfoButtonText: {
color: '#ed1b24'
},
boxCustommerInfoChange: {},
boxCustommerInfoChangeList: {
padding: 10,
borderColor: '#e1e1e1',
borderWidth: 1,
borderRadius: 5,
},
boxCustommerInfoChangeTitle: {
fontSize: 16,
fontWeight: 'bold',
marginBottom: 10,
},
custommerInfoChangeItem: {
marginBottom: 15,
flexDirection: 'row',
alignItems: 'center'
},
custommerInfoChangeItemText: {
width: 148,
},
custommerInfoChangeItemContent: {
width: winWidthP10 - 170,
},
custommerInfoChangeItemInput: {
width: '100%',
height: 36,
borderRadius: 3,
borderWidth: 1,
borderColor: '#e1e1e1',
paddingHorizontal: 10,
},
registerItemSex: {
flexDirection: 'row',
alignItems: 'center',
},
registerItemSexItem: {
flexDirection: 'row',
alignItems: 'center',
marginRight: 20,
},
registerItemSexText: {
marginRight: 5,
},
registerItemSexRadio: {
width: 36,
height: 36,
borderColor: '#333',
borderWidth: 1,
borderRadius: 18,
},
picker: {
height: 46,
width: '100%',
},
onePickerItem: {
height: 46,
color: '#222',
fontSize: 14,
textAlign: 'center',
width: '100%',
},
boxCustommerInfoChangeSubmit: {
width: 150,
height: 36,
backgroundColor: 'red',
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
borderRadius: 5,
},
boxCustommerInfoChangeSubmitText: {
color: '#fff'
},
boxProductSave: {},
boxProductSaveTitle: {
fontSize: 16,
fontWeight: 'bold',
marginBottom: 15,
},
listProductSave: {},
})