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 { useNavigation } from '@react-navigation/native'; 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'; export default function AccountHome() { return ( ) } const HeaderAccountHome = () => { const navigation = useNavigation(); return ( Nguyễn Quỳnh Xu 10 navigation.navigate('SettingAccount')} style={styles.headerAccountHomeCtSetting}> ) } const ListContentAccount = () => { const navigation = useNavigation(); return ( navigation.navigate('AccountOrderList')} style={styles.boxListItemAccBt}> Đơn hàng của tôi Xem tất cả navigation.navigate('AccountProductBought')} style={styles.boxListItemAccBt}> Sản phẩm bạn đã mua navigation.navigate('AccountProductViewHistory')} style={styles.boxListItemAccBt}> Sản phẩm bạn đã xem navigation.navigate('AccountProductFavorite')} style={styles.boxListItemAccBt}> Sản phẩm yêu thích navigation.navigate('AccountProductSave')} style={styles.boxListItemAccBt}> Sản phẩm mua sau navigation.navigate('AccountCoin')} style={styles.boxListItemAccBt}> Quản lý Xu của tôi navigation.navigate('CustomerInfo')} style={styles.boxListItemAccBt}> Tài khoản Trung tậm trợ giúp ) } 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 ) } function formatCurrency(price: string | number) { let priceConvert = parseFloat(`${price}`).toFixed(2).replace(/(\d)(?=(\d{3})+\.)/g, "$1.").toString(); let len = priceConvert.length; return priceConvert.substring(0, len - 3); } const ChangePassword = () => { return ( Thay đổi mật khẩu Mật khẩu hiện tại Mật khẩu mới Nhập lại mật khẩu mới Thay đổi ) } 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', }, headerAccountHome: { width: winWidth, position: 'relative', }, headerAccountHomeImg: { width: '100%', height: 122, }, headerAccountHomeCt: { width: '100%', position: 'absolute', left: 0, bottom: 18, flexDirection: 'row', justifyContent: 'space-between', backgroundColor: 'rgba(0,0,0,0)', paddingHorizontal: 10, }, headerAccountHomeCtLeft: { flexDirection: 'row', alignItems: 'center', backgroundColor: 'rgba(0,0,0,0)', }, headerAccountHomeCtCusImg: { width: 56, height: 56, marginRight: 10, borderRadius: 28, overflow: 'hidden' }, headerAccountHomeCtCusInfo: { backgroundColor: 'rgba(0,0,0,0)', }, headerAccountHomeCtCusName: { fontSize: 16, fontWeight: '700', color: '#fff', marginBottom: 5, }, headerAccountHomeCtCusXu: { fontSize: 13, fontWeight: '300', color: '#fff' }, headerAccountHomeCtRight: { backgroundColor: 'rgba(0,0,0,0)', }, headerAccountHomeCtSetting: { width: 30, height: 30, borderRadius: 15, backgroundColor: '#fff', flexDirection: 'row', alignItems: 'center', justifyContent: 'center', }, headerAccountHomeCtSettingIcon: { fontSize: 18, }, boxListItemAcc: { width: winWidth, backgroundColor: '#f2f2f2', }, boxListItemAccList: { width: '100%', backgroundColor: '#fff', marginBottom: 10, }, borderBot: { borderBottomColor: '#e1e1e1', borderBottomWidth: 1, }, boxListItemAccItem: { width: '100%', paddingHorizontal: 10, }, boxListItemAccBt: { width: '100%', flexDirection: 'row', alignItems: 'center', justifyContent: 'space-between', height: 48, }, boxListItemAccItemLeft: { flexDirection: 'row', alignItems: 'center', }, boxListItemAccItemImg: { width: 20, marginRight: 10, }, boxListItemAccItemLeftText: { fontWeight: '500', }, boxListItemAccItemRight: { flexDirection: 'row', alignItems: 'center', }, boxListItemAccItemRightText: { marginRight: 10, }, boxListItemAccItemIcon: { fontSize: 24, color: '#777' }, 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' }, custommerInfo: { }, custommerInfoItemHeader: { marginBottom: 10, fontWeight: 'bold', }, custommerInfoItem: { marginBottom: 10, }, custommerInfoButtonText: { color: '#ed1b24' }, boxCustommerInfoChange: {}, boxCustommerInfoChangeList: { padding: 10, borderColor: '#e1e1e1', borderWidth: 1, borderRadius: 5, }, titleBoxInAccount: { 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' }, })