import * as React from 'react';
import { Alert, Button, Image, StyleSheet, Dimensions, SafeAreaView, ScrollView, TouchableOpacity, ImageBackground } from 'react-native';
import { LinearGradient } from 'expo-linear-gradient';
import { Ionicons, FontAwesome } from '@expo/vector-icons';
import EditScreenInfo from '../components/EditScreenInfo';
import { Text, View } from '../components/Themed';
import { TextInput } from 'react-native-gesture-handler';
import Swiper from 'react-native-swiper';
import { Asset } from 'expo-asset';
export default function HomePage() {
return (
);
}
const winWidth = Dimensions.get('window').width; //full width
const winHeight = Dimensions.get('window').height; //full height
const SliderHome = () => {
const imageSlider = [
{
img: require('../assets/images/slider.jpg'),
},
{
img: require('../assets/images/slider.jpg'),
},
{
img: require('../assets/images/slider.jpg'),
},
]
return (
{
imageSlider.map((item, index) => {
return ();
})
}
);
}
const CategoryHomePage = () => {
return (
Siêu phẩm hè
Diện gia dụng
Đồ gia dụng
Thiết bị nhà bếp
Điều hòa
Khẩu trang vải
Deal Hot
Combo
)
}
const FlastSale = () => {
return (
Xem tất cả
NỒI CHIÊN KHÔNG DẦU SMARTPLUS NAGAKAWA NAG3303 (9L)
Giá sốc online
4.100.000đ
4.500.000đ
-30%
Đã bán 6
Đã bán
6
/ 30 sản phẩm
Kết thúc trong
04
Giờ
:
08
Phút
:
56
Giây
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L) - Van xả kép - Hàng chính hãng
1.292.000đ
1.634.000đ
-30%
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L) - Van xả kép - Hàng chính hãng
1.292.000đ
1.634.000đ
-30%
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L) - Van xả kép - Hàng chính hãng
1.292.000đ
1.634.000đ
-30%
)
}
const ProductHot = () => {
return (
Khuyến mại hot mỗi ngày
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L)
1.292.000đ
1.634.000đ
-30%
*3 khuyến mãi trị giá
500.000đ
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L)
1.292.000đ
1.634.000đ
-30%
*3 khuyến mãi trị giá
500.000đ
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L)
1.292.000đ
1.634.000đ
-30%
*3 khuyến mãi trị giá
500.000đ
Xem tất cả
)
}
const ProductBestSale = () => {
return (
Sản phẩm bán chạy
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L)
1.292.000đ
1.634.000đ
-30%
*3 khuyến mãi trị giá
500.000đ
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L)
1.292.000đ
1.634.000đ
-30%
*3 khuyến mãi trị giá
500.000đ
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L)
1.292.000đ
1.634.000đ
-30%
*3 khuyến mãi trị giá
500.000đ
Xem tất cả
)
}
const ComboHome = () => {
return (
Combo dành cho bạn
Combo 1
Combo 2
Combo 3
Combo 4
Combo 5
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L)
1.292.000đ
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L)
1.292.000đ
=
1.057.000đ
Giá Combo:
985.000đ
Tiết kiệm 199.000đ
Mua combo
)
}
const ProductHome = () => {
return (
Thiết bị nhà bếp
Đồ gia dụng
Điện gia dụng
Điều hòa
Khẩu trang vải
Deal hot
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L)
1.292.000đ
1.634.000đ
-30%
*3 khuyến mãi trị giá
500.000đ
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L)
1.292.000đ
1.634.000đ
-30%
*3 khuyến mãi trị giá
500.000đ
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L)
1.292.000đ
1.634.000đ
-30%
*3 khuyến mãi trị giá
500.000đ
Nồi áp suất inox 304 cao cấp Nagakawa NAG1452 (5L)
1.292.000đ
1.634.000đ
-30%
*3 khuyến mãi trị giá
500.000đ
Xem tất cả
)
}
const styles = StyleSheet.create({
container: {
flex: 1,
alignItems: 'center',
justifyContent: 'center',
backgroundColor: '#f2f2f2',
},
slider: {
width: winWidth,
height: winWidth - 20,
paddingHorizontal: 10,
position: 'relative',
marginTop: 15,
},
sliderSwipper: {},
imgSlider: {
width: winWidth - 20,
height: winWidth - 20,
},
boxCatHome: {
width: winWidth,
paddingHorizontal: 10,
paddingVertical: 15,
},
boxCatHomeList: {
paddingBottom: 8,
},
boxCatHomeItem: {
width: 58,
marginRight: 20,
flexDirection: 'column',
alignItems: 'center',
},
boxCatHomeItemLast: {
marginRight: 0,
},
boxCatHomeItemImg: {
width: 40,
height: 40,
borderRadius: 8,
marginBottom: 10,
shadowColor: "#000",
shadowOffset: {
width: 0,
height: 3,
},
shadowOpacity: 0.27,
shadowRadius: 4.65,
elevation: 6,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center'
},
boxCatHomeImg: {
width: 28,
height: 28,
},
boxCatHomeText: {
textAlign: 'center',
fontSize: 11,
color: '#6A6A6A'
},
boxFlastSaleHome: {
width: winWidth,
marginBottom: 10,
paddingBottom: 10,
},
boxFlastSaleHomeTitle: {
width: '100%',
flexDirection: 'row',
justifyContent: 'space-between',
padding: 10,
backgroundColor: '#D8262F',
alignItems: 'center'
},
boxFlastSaleHomeTitleImg: {
width: 187,
height: 59,
},
boxFlastSaleHomeTitleVm: {
width: 104,
height: 32,
flexDirection: 'row',
justifyContent: 'space-between',
paddingHorizontal: 10,
alignItems: 'center',
backgroundColor: '#fff',
borderRadius: 5,
},
boxFlastSaleHomeTitleVmText: {
fontStyle: 'italic',
color: '#D8262F',
fontSize: 14,
},
boxFlastSaleHomeTitleVmIcon: {
fontStyle: 'italic',
color: '#D8262F',
fontSize: 14,
},
boxFlastSaleHomeFirstItem: {
padding: 10,
},
boxFlastSaleHomeImg: {
width: '100%',
height: winWidth - 20,
position: 'relative',
marginBottom: 15,
},
boxFlastSaleHomeImgCt: {
width: '100%',
height: '100%',
position: 'absolute',
top: 0,
left: 0,
right: 0,
bottom: 0,
},
boxFlastSaleHomeFirstName: {
fontSize: 18,
fontWeight: 'bold',
textTransform: 'uppercase',
color: '#000',
marginBottom: 10,
},
boxFlastSaleHomeFirstAllPrice: {
width: '100%',
flexDirection: 'row',
marginBottom: 10,
},
boxFlastSaleHomeFirstPrice: {
width: '50%',
paddingRight: 5,
},
boxFlastSaleHomeFirstPriceName: {
fontSize: 14,
fontWeight: 'bold',
marginBottom: 8,
},
boxFlastSaleHomeFirstPriceText: {
fontSize: 22,
fontWeight: 'bold',
color: '#D8262F'
},
boxFlastSaleHomeFirstPriceOld: {
width: '50%',
paddingLeft: 5,
},
boxFlastSaleHomeFirstOldPrice: {
fontSize: 16,
fontWeight: 'bold',
textDecorationLine: 'line-through',
marginBottom: 2,
},
boxFlastSaleHomeFirstDiscount: {
paddingVertical: 5,
backgroundColor: '#D8262F',
width: 60,
textAlign: 'center',
color: '#fff',
borderRadius: 5,
overflow: 'hidden'
},
boxFlastSaleHomeFirstSaleQuan: {
width: '100%',
flexDirection: 'row',
alignItems: 'center',
paddingBottom: 10,
borderBottomWidth: 1,
borderBottomColor: '#e1e1e1',
marginBottom: 10,
},
boxFlastSaleHomeFirstSaleQuanLeft: {
width: '50%',
paddingRight: 5,
},
boxFlastSaleHomeFirstSaleQuanLeftCt: {
width: '100%',
height: 15,
borderRadius: 7.5,
backgroundColor: '#FFE2E2',
position: 'relative',
},
boxFlastSaleHomeFirstSaleQuanLeftDown: {
position: 'absolute',
width: '20%',
top: 0,
left: 0,
backgroundColor: '#D8262F',
zIndex: 2,
height: 15,
borderRadius: 7.5,
},
boxFlastSaleHomeFirstSaleQuanLeftText: {
marginLeft: 10,
fontSize: 10,
color: '#fff',
lineHeight: 15,
position: 'relative',
zIndex: 5,
},
boxFlastSaleHomeFirstSaleQuanRight: {
width: '50%',
paddingLeft: 5,
},
boxFlastSaleHomeFirstSaleQuanRightCt: {
flexDirection: 'row',
alignItems: 'center'
},
boxFlastSaleHomeFirstSaleQuanRightText: {
fontSize: 13,
},
boxFlastSaleHomeFirstSaleQuanRightTextRed: {
fontSize: 13,
color: '#D8262F',
marginHorizontal: 5,
},
boxFlastSaleHomeFirstTime: {
width: '100%',
flexDirection: 'row',
alignItems: 'center',
},
boxFlastSaleHomeFirstTimeTitle: {
fontSize: 14,
width: 100,
},
boxFlastSaleHomeFirstTimeList: {
width: winWidth - 120,
flexDirection: 'row',
alignItems: 'center',
},
boxFlastSaleHomeFirstTimeItem: {
width: 48,
backgroundColor: '#3B3B3B',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
borderRadius: 10,
},
boxFlastSaleHomeFirstItemCt: {
height: 34,
backgroundColor: 'rgba(0,0,0,0)',
width: '100%',
borderBottomColor: 'rgba(255,255,255,0.3)',
borderBottomWidth: 1,
flexDirection: 'row',
alignItems: 'center',
justifyContent: 'center',
},
boxFlastSaleHomeFirstTimeNum: {
fontSize: 22,
fontWeight: 'bold',
color: '#fff',
},
boxFlastSaleHomeFirstTimeText: {
height: 30,
lineHeight: 30,
textTransform: 'uppercase',
color: '#fff',
},
boxFlastSaleHomeFirstTimeTextChia: {
marginHorizontal: 10,
fontSize: 24,
},
boxFlastSaleHomeList: {
paddingHorizontal: 10,
marginTop: 10,
},
boxFlastSaleHomeListItem: {
width: winWidth - 20,
marginRight: 20,
borderWidth: 1,
borderColor: '#e1e1e1',
borderRadius: 10,
padding: 10,
flexDirection: 'row',
},
boxFlastSaleHomeListItemLast: {
marginRight: 0,
},
boxFlastSaleHomeListItemImg: {
width: 113,
height: 113,
marginRight: 20,
position: 'relative'
},
boxFlastSaleHomeListItemInfo: {
width: winWidth - 175,
},
boxFlastSaleHomeListItemName: {
fontSize: 14,
marginBottom: 10,
},
boxFlastSaleHomeListItemPrice: {
fontSize: 18,
fontWeight: 'bold',
color: '#D8262F',
marginBottom: 5,
},
boxFlastSaleHomeListItemOldPriceAll: {
flexDirection: 'row',
alignItems: 'center'
},
boxFlastSaleHomeListItemOldPrice: {
fontSize: 14,
color: '#A1A1A1',
textDecorationLine: 'line-through',
},
boxFlastSaleHomeListItemDiscount: {
paddingVertical: 5,
backgroundColor: '#D8262F',
width: 60,
textAlign: 'center',
color: '#fff',
borderRadius: 5,
overflow: 'hidden',
marginLeft: 10,
},
boxProductHot: {
width: winWidth,
marginBottom: 10,
backgroundColor: '#D8262F',
position: 'relative',
},
bgProductHot: {
width: winWidth,
height: 200,
position: 'absolute',
zIndex: 1,
top: 0,
left: 0,
},
boxProductHotTitle: {
paddingHorizontal: 10,
textAlign: 'center',
marginVertical: 15,
fontSize: 20,
textTransform: 'uppercase',
color: '#fff',
fontWeight: 'bold',
position: 'relative',
zIndex: 2,
},
boxProductHotList: {
width: winWidth,
paddingHorizontal: 10,
backgroundColor: 'rgba(0,0,0,0)',
position: 'relative',
zIndex: 2,
marginBottom: 20,
},
boxProductHotItem: {
width: 180,
marginRight: 10,
borderRadius: 10,
overflow: 'hidden',
},
boxProductHotItemLast: {
marginRight: 0,
},
pContainer: {
width: '100%',
padding: 10,
},
pImgContent: {
width: '100%',
position: 'relative',
paddingTop: '100%',
marginBottom: 10,
},
pNew: {
width: 24,
height: 18,
position: 'absolute',
zIndex: 6,
top: 0,
left: 0,
},
pImg: {
width: '100%',
position: 'absolute',
zIndex: 5,
top: 0,
left: 0,
right: 0,
bottom: 0,
},
pTraGop: {
width: 68,
height: 16,
position: 'absolute',
zIndex: 6,
bottom: 0,
left: '50%',
transform: [{ translateX: -34 }],
},
pInfo: {
width: '100%',
},
pName: {
width: '100%',
fontSize: 14,
marginBottom: 10,
},
pPrice: {
width: '100%',
fontSize: 18,
marginBottom: 10,
color: '#D8262F',
fontWeight: 'bold',
},
pAllSale: {
width: '100%',
flexDirection: 'row',
alignItems: 'center',
marginBottom: 10,
},
pOldPrice: {
color: '#A1A1A1',
fontSize: 14,
textDecorationLine: 'line-through',
},
pDiscount: {
paddingVertical: 5,
backgroundColor: '#D8262F',
width: 50,
textAlign: 'center',
color: '#fff',
borderRadius: 5,
overflow: 'hidden',
marginLeft: 5,
},
pOffer: {
flexDirection: 'row',
alignItems: 'center',
},
pOfferText: {
fontSize: 10,
color: '#A1A1A1',
},
pOfferPrice: {
fontSize: 10,
color: '#D8262F',
},
vmWhite: {
width: '100%',
marginBottom: 20,
flexDirection: 'row',
justifyContent: 'center',
backgroundColor: 'rgba(0,0,0,0)'
},
vmWhiteButton: {
width: 104,
height: 32,
borderRadius: 5,
borderColor: '#fff',
borderWidth: 1,
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
},
vmWhiteText: {
fontSize: 14,
fontStyle: 'italic',
color: '#fff',
marginRight: 10,
},
vmWhiteIcon: {
fontSize: 14,
fontStyle: 'italic',
color: '#fff',
},
productBestSale: {
marginBottom: 20,
paddingHorizontal: 10,
backgroundColor: '#f2f2f2',
position: 'relative',
width: winWidth,
},
productBestSaleTitle: {
width: winWidth - 20,
height: 40,
position: 'relative',
zIndex: 5,
backgroundColor: 'rgba(0,0,0,0)'
},
productBestSaleTitleImg: {
width: '100%',
height: '100%',
},
productBestSaleTitleText: {
width: 200,
lineHeight: 40,
fontSize: 22,
fontWeight: 'bold',
color: '#fff',
textTransform: 'uppercase',
position: 'absolute',
zIndex: 2,
top: 0,
left: '50%',
transform: [{ translateX: -100 }],
textAlign: 'center',
fontStyle: 'italic',
},
productBestSaleList: {
borderWidth: 1,
borderColor: '#D8262F',
borderRadius: 10,
overflow: 'hidden',
marginTop: -20,
paddingTop: 30,
},
boxProductBestSaleItemStTwo: {
width: '100%',
borderBottomWidth: 1,
borderBottomColor: '#e1e1e1',
},
pContainerStTwo: {
flexDirection: 'row',
padding: 10,
},
pImgContentTwo: {
width: 111,
height: 111,
marginRight: 20,
position: 'relative',
},
pInfoStTwo: {
width: winWidth - 175,
},
vmRed: {
width: '100%',
marginBottom: 20,
flexDirection: 'row',
justifyContent: 'center',
backgroundColor: 'rgba(0,0,0,0)',
marginTop: 20,
},
vmRedButton: {
width: 104,
height: 32,
borderRadius: 5,
borderColor: '#D8262F',
borderWidth: 1,
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#fff',
},
vmRedText: {
fontSize: 14,
fontStyle: 'italic',
color: '#D8262F',
marginRight: 10,
},
vmRedIcon: {
fontSize: 14,
fontStyle: 'italic',
color: '#D8262F',
},
boxComboHome: {
width: winWidth,
marginBottom: 20,
},
boxComboHomeTitle: {
padding: 10,
},
boxComboHomeTitleText: {
fontSize: 22,
fontWeight: 'bold',
textTransform: 'uppercase',
color: '#D8262F',
fontStyle: 'italic',
},
boxComboHomeListCombo: {
padding: 10,
width: winWidth,
backgroundColor: '#f2f2f2',
},
boxComboHomeListComboItem: {
width: 80,
height: 56,
marginRight: 10,
borderRadius: 10,
overflow: 'hidden',
flexDirection: 'column',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#fff',
},
boxComboHomeListComboItemActive: {
backgroundColor: '#D8262F',
},
boxComboHomeListComboItemLast: {
marginRight: 0,
},
boxComboHomeListComboItemImg: {
width: 28,
height: 28,
},
boxComboHomeListComboItemText: {
fontWeight: '500',
},
boxComboHomeListComboItemTextActive: {
color: '#fff',
},
boxComboHomeListComboContent: {
width: winWidth,
paddingHorizontal: 10,
marginBottom: 10,
},
boxComboHomeTotalPrice: {
width: winWidth,
padding: 10,
borderTopWidth: 1,
borderTopColor: '#e1e1e1',
flexDirection: 'row',
alignItems: 'center',
},
boxComboHomeTotalPriceSum: {
width: 40,
fontSize: 40,
color: '#999'
},
boxComboHomeTotalPriceCotent: {
width: winWidth - 180,
},
boxComboHomeTotalPriceOldPrice: {
fontSize: 14,
color: '#A1A1A1',
textDecorationLine: 'line-through',
marginBottom: 5,
},
boxComboHomeTotalPriceAll: {
flexDirection: 'row',
marginBottom: 5,
alignItems: 'flex-end',
},
boxComboHomeTotalPriceAllText: {
marginRight: 8,
},
boxComboHomeTotalPriceAllNum: {
fontSize: 16,
fontWeight: 'bold',
color: '#D8262F',
},
boxComboHomeTotalPriceDiscount: {
color: '#D8262F',
},
boxComboHomeTotalPriceButton: {
width: 120,
height: 40,
flexDirection: 'row',
justifyContent: 'center',
alignItems: 'center',
backgroundColor: '#D8262F',
borderRadius: 10,
},
boxComboHomeTotalPriceButtonText: {
fontSize: 16,
fontWeight: 'bold',
color: '#fff',
},
boxProductHome: {
marginBottom: 20,
backgroundColor: '#f2f2f2'
},
boxProductHomeListCat: {
width: winWidth,
padding: 10,
},
boxProductHomeListCatItem: {
width: 58,
marginRight: 20,
flexDirection: 'column',
alignItems: 'center',
},
boxProductHomeListCatItemLast: {
marginRight: 0,
},
boxProductHomeListCatImg: {
marginBottom: 5,
},
boxProductHomeListCatText: {
textAlign: 'center',
},
boxProductHomeListCatTextActive: {
color: '#D8262F'
},
boxProductHomeList: {
width: winWidth,
paddingHorizontal: 10,
paddingTop: 10,
backgroundColor: '#f2f2f2',
flexDirection: 'row',
flexWrap: 'wrap',
alignItems: 'center',
},
boxProductHomeItem: {
width: winWidth/2 - 15,
marginRight: 10,
marginBottom: 10,
borderRadius: 10,
overflow: 'hidden'
},
boxProductHomeItemChan: {
marginRight: 0,
}
});