Showing
3 changed files
with
13 additions
and
1 deletions
| @@ -14,16 +14,28 @@ export default class CommonImageView extends Component { | @@ -14,16 +14,28 @@ export default class CommonImageView extends Component { | ||
| 14 | super(props); | 14 | super(props); |
| 15 | this.state = { | 15 | this.state = { |
| 16 | products: [ | 16 | products: [ |
| 17 | - | 17 | + { |
| 18 | + headerImage: require("../assets/home/product_header_1.jpg"), | ||
| 19 | + title: "", | ||
| 20 | + subscribe: "", | ||
| 21 | + price: "" | ||
| 22 | + },{ | ||
| 23 | + headerImage: require("../assets/home/product_header_2.jpg"), | ||
| 24 | + title: "", | ||
| 25 | + subscribe: "", | ||
| 26 | + price: "", | ||
| 27 | + } | ||
| 18 | ] | 28 | ] |
| 19 | } | 29 | } |
| 20 | } | 30 | } |
| 21 | render() { | 31 | render() { |
| 22 | console.log("Image index", this.props.navigation.state.params.index); | 32 | console.log("Image index", this.props.navigation.state.params.index); |
| 23 | const index = this.props.navigation.state.params.index; | 33 | const index = this.props.navigation.state.params.index; |
| 34 | + const item = this.state.products[index]; | ||
| 24 | return ( | 35 | return ( |
| 25 | <View style={styles.container}> | 36 | <View style={styles.container}> |
| 26 | <ScrollView> | 37 | <ScrollView> |
| 38 | + | ||
| 27 | {index == 0 ? ( | 39 | {index == 0 ? ( |
| 28 | <Image | 40 | <Image |
| 29 | style={styles.imgOne} | 41 | style={styles.imgOne} |
src/assets/home/product_header_1.jpg
0 → 100644
47.1 KB
src/assets/home/product_header_2.jpg
0 → 100644
38.2 KB
-
Please register or login to post a comment