HomeView.js 1.92 KB
Newer Older
Giang Tran committed
1
import React from 'react';
Giang Tran committed
2 3 4 5 6
import {
  ImageBackground,
  StyleSheet,
  ScrollView,
} from 'react-native';
Giang Tran committed
7
import HeaderHome from '../../components/Header/HeaderHome';
8
import {getFontXD} from '../../Config/Functions';
Giang Tran committed
9
import R from '../../assets/R';
Giang Tran committed
10
import SwiperComponent from './SwiperComponent';
Nguyễn Thị Thúy committed
11
import PriceListView from './PriceListView';
Giang Tran committed
12

Giang Tran committed
13
const HomeView = (props) => {
Giang Tran committed
14
  return (
Giang Tran committed
15 16 17 18 19 20
    <ImageBackground
      source={R.images.bgHome}
      resizeMode={'stretch'}
      style={{width: '100%', height: '100%'}}>
      <ScrollView showsVerticalScrollIndicator={false}>
        <HeaderHome />
Giang Tran committed
21 22
        {props.listImage.length > 0 ? (
          <SwiperComponent listImage={props.listImage} />
Giang Tran committed
23 24 25
        ) : (
          <View style={{height: 10}} />
        )}
Nguyễn Thị Thúy committed
26
        <PriceListView
Giang Tran committed
27 28 29 30
          setFilterId={props.setFilterId}
          filterId={props.filterId}
          filters={props.filters}
          dataPrice={props.dataPrice}
Nguyễn Thị Thúy committed
31
        />
Giang Tran committed
32 33
      </ScrollView>
    </ImageBackground>
Giang Tran committed
34 35 36 37
  );
};

export default HomeView;
Giang Tran committed
38 39 40 41
const styles = StyleSheet.create({
  body: {
    flex: 1,
    backgroundColor: '#DFE7F5',
Giang Tran committed
42

Giang Tran committed
43 44 45 46
    marginTop: 60,
    borderTopLeftRadius: 60,
  },
  containerBody: {
Giang Tran committed
47
    marginTop: -50,
Giang Tran committed
48 49 50 51
  },
  containerMenu: {
    height: 160,
    backgroundColor: 'white',
Giang Tran committed
52 53
    marginTop: 20,
    marginBottom: 10,
Giang Tran committed
54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75
    marginHorizontal: 20,
    borderRadius: 10,
    shadowColor: '#000',
    shadowOffset: {
      width: 0,
      height: 1,
    },
    shadowOpacity: 0.25,
    shadowRadius: 2.84,
    elevation: 3,
  },
  row: {
    flexDirection: 'row',
    flex: 1,
  },
  itemMenu: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
  },
  txtTitle: {
    fontSize: getFontXD(36),
Giang Tran committed
76
    color: '#00359C',
Giang Tran committed
77
    textTransform: 'uppercase',
Giang Tran committed
78
    fontWeight: 'bold',
Giang Tran committed
79 80
  },
  txtMoney: {
Giang Tran committed
81
    fontSize: getFontXD(42),
Giang Tran committed
82 83 84 85
    color: R.colors.black,
    marginTop: 5,
  },
  txtMoney1: {
Giang Tran committed
86 87
    fontSize: getFontXD(42),
    color: '#2fbd04',
Giang Tran committed
88 89 90
    marginTop: 5,
  },
});