Skip to content

Commit b394a9c

Browse files
author
Nattatorn Yucharoen
committed
Expo SDK 38.0.9
1 parent e3cb103 commit b394a9c

File tree

15 files changed

+46
-82
lines changed

15 files changed

+46
-82
lines changed

screens/Product1/PhotoButton.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@ const PhotoButton = () => (
1616
fontWeight: '400',
1717
}}
1818
buttonStyle={{
19-
borderWidth: 0,
20-
borderRadius: 5,
21-
paddingLeft: 10,
2219
backgroundColor: 'rgba(128,128,128, 0.7)',
20+
borderRadius: 5,
21+
borderWidth: 0,
2322
elevation: 0,
23+
paddingLeft: 10,
2424
}}
2525
containerStyle={{
2626
marginBottom: 15,

screens/Product1/Product.js

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ import {
99
} from 'react-native'
1010
import PropTypes from 'prop-types'
1111

12+
import productData from './product.json'
13+
1214
import PhotoButton from './PhotoButton'
1315
import ProductStyles from './ProductStyle'
1416

15-
import productData from './product.json'
16-
1717
const styles = StyleSheet.create({ ...ProductStyles })
1818

1919
class Product extends Component {
@@ -49,9 +49,7 @@ class Product extends Component {
4949

5050
renderNavigator = () => {
5151
return (
52-
<View
53-
style={{ flexDirection: 'row' }}
54-
>
52+
<View style={{ flexDirection: 'row' }} >
5553
<TouchableOpacity style={[styles.navigatorButton, { flex: 2 }]}>
5654
<Text style={styles.navigatorText}>DIRECTIONS</Text>
5755
</TouchableOpacity>
@@ -66,12 +64,11 @@ class Product extends Component {
6664
}
6765

6866
renderContactHeader = () => {
69-
const { img } = this.props
7067
return (
7168
<View style={styles.headerContainer}>
7269
<View style={styles.coverContainer}>
7370
<ImageBackground
74-
source={{ uri: img }}
71+
source={{uri: this.props.img}}
7572
style={styles.coverImage}
7673
>
7774
<PhotoButton />
@@ -83,7 +80,7 @@ class Product extends Component {
8380

8481
render() {
8582
return (
86-
<View style={styles.mainviewStyle}>
83+
<View style={styles.mainViewStyle}>
8784
<ScrollView style={styles.scroll}>
8885
<View style={[styles.container, this.props.containerStyle]}>
8986
<View style={styles.cardContainer}>

screens/Product1/ProductStyle.js

Lines changed: 21 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -28,83 +28,81 @@ export default {
2828
productRow: {
2929
margin: 25,
3030
},
31-
mainviewStyle: {
31+
mainViewStyle: {
3232
flex: 1,
33-
flexGrow: 1,
3433
flexDirection: 'column',
34+
flexGrow: 1,
3535
},
3636
coverMetaContainer: {
3737
alignItems: 'flex-end',
3838
flex: 1,
3939
justifyContent: 'flex-end',
4040
},
4141
footer: {
42-
position: 'absolute',
43-
flex: 0.1,
44-
left: 0,
45-
right: 0,
46-
bottom: 0,
42+
alignItems: 'center',
4743
backgroundColor: '#e36449',
44+
bottom: 0,
45+
flex: 0.1,
4846
flexDirection: 'row',
4947
height: 65,
50-
alignItems: 'center',
48+
left: 0,
49+
position: 'absolute',
50+
right: 0,
5151
},
5252
buttonFooter: {
5353
alignItems: 'center',
54-
justifyContent: 'center',
5554
flex: 1,
55+
justifyContent: 'center',
5656
},
5757
navigatorButton: {
5858
alignItems: 'flex-start',
59-
justifyContent: 'center',
6059
flex: 1,
60+
justifyContent: 'center',
6161
},
6262
navigatorText: {
63+
alignItems: 'flex-start',
6364
color: Colors.green,
65+
fontSize: 16,
6466
fontWeight: 'bold',
65-
alignItems: 'flex-start',
6667
justifyContent: 'center',
67-
68-
fontSize: 16,
6968
},
7069
borderCenter: {
71-
height: 55,
72-
borderWidth: 0.5,
7370
borderColor: '#FFA890',
71+
borderWidth: 0.5,
72+
height: 55,
7473
},
7574
textFooter: {
76-
color: 'white',
77-
fontWeight: 'bold',
7875
alignItems: 'center',
76+
color: 'white',
7977
fontSize: 18,
78+
fontWeight: 'bold',
8079
},
8180
priceText: {
82-
marginBottom: 5,
83-
letterSpacing: 1,
84-
8581
color: Colors.black,
8682
fontSize: 36,
8783
fontWeight: '400',
84+
letterSpacing: 1,
85+
marginBottom: 5,
8886
},
8987
detailText: {
90-
marginBottom: 4,
9188
color: Colors.black,
9289
fontSize: 22,
9390
fontWeight: '600',
9491
letterSpacing: 0.5,
92+
marginBottom: 4,
9593
},
9694
subDetailText: {
9795
color: Colors.black,
9896
fontSize: 16,
9997
fontWeight: '100',
100-
lineHeight: 28,
10198
letterSpacing: 0.5,
99+
lineHeight: 28,
102100
},
103101
descriptionText: {
104-
marginBottom: 4,
105102
color: Colors.gray,
106103
fontSize: 16,
107104
fontWeight: '400',
108105
letterSpacing: 1,
106+
marginBottom: 4,
109107
},
110108
}

screens/Product1/index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import React from 'react'
22
import PropTypes from 'prop-types'
3+
34
import productData from './product.json'
45

56
import { NavAbsolute } from '../../components'

screens/Profile1/Email.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,6 @@ import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
33
import { Icon } from 'react-native-elements'
44
import PropTypes from 'prop-types'
55

6-
import mainColor from './constants'
7-
86
const styles = StyleSheet.create({
97
container: {
108
flexDirection: 'row',
@@ -17,7 +15,7 @@ const styles = StyleSheet.create({
1715
marginBottom: 5,
1816
},
1917
emailIcon: {
20-
color: mainColor,
18+
color: 'gray',
2119
fontSize: 30,
2220
},
2321
emailNameColumn: {

screens/Profile1/Profile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React, { Component } from 'react'
22
import { Card, Icon } from 'react-native-elements'
33
import {
4+
FlatList,
45
Image,
56
ImageBackground,
67
Linking,
7-
FlatList,
88
Platform,
99
ScrollView,
1010
StyleSheet,

screens/Profile1/Separator.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ const styles = StyleSheet.create({
1010
flexDirection: 'row',
1111
},
1212
separator: {
13-
flex: 8,
14-
flexDirection: 'row',
1513
borderColor: '#EDEDED',
1614
borderWidth: 0.8,
15+
flex: 8,
16+
flexDirection: 'row',
1717
},
1818
})
1919

screens/Profile2/Post.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ const Post = ({ containerStyle, user, image, createdDate, sentences }) => (
7070
<View style={styles.wordRow}>
7171
<Text style={styles.wordText}>{sentences}</Text>
7272
</View>
73-
{image && <Image style={styles.postImage} source={{ uri: image }} />}
73+
{image && <Image style={styles.postImage} source={{uri: image}} />}
7474
</View>
7575
)
7676

screens/Profile2/Profile.js

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -157,11 +157,11 @@ class Profile2 extends Component {
157157

158158
renderTabBar = props => {
159159
return <TabBar
160-
{...props}
161160
indicatorStyle={styles.indicatorTab}
162161
renderLabel={this.renderLabel(props)}
163162
pressOpacity={0.8}
164163
style={styles.tabBar}
164+
{...props}
165165
/>
166166
};
167167

@@ -205,14 +205,6 @@ class Profile2 extends Component {
205205
}
206206
}
207207

208-
renderPager = props => {
209-
return Platform.OS === 'ios' ? (
210-
<TabViewPagerScroll {...props} />
211-
) : (
212-
<TabViewPagerPan {...props} />
213-
)
214-
}
215-
216208
renderContactHeader = () => {
217209
const { avatar, name, bio } = this.props
218210

@@ -221,9 +213,7 @@ class Profile2 extends Component {
221213
<View style={styles.userRow}>
222214
<Image
223215
style={styles.userImage}
224-
source={{
225-
uri: avatar,
226-
}}
216+
source={{uri: avatar}}
227217
/>
228218
<View style={styles.userNameRow}>
229219
<Text style={styles.userNameText}>{name}</Text>
@@ -276,8 +266,6 @@ class Profile2 extends Component {
276266
navigationState={this.state.tabs}
277267
renderScene={this.renderScene}
278268
renderTabBar={this.renderTabBar}
279-
// renderPager={this._renderPager}
280-
// renderHeader={this._renderHeader}
281269
onIndexChange={this.handleIndexChange}
282270
/>
283271
</View>

screens/Profile3/Post.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ const Post = ({
2525
height: postWidth * (imageHeight / imageWidth),
2626
},
2727
]}
28-
source={{ uri: image }}
28+
source={{uri: image}}
2929
/>
3030
)}
3131
</View>

0 commit comments

Comments
 (0)