Skip to content

Commit a46f958

Browse files
committed
🎨 Refactor: sort order of import declarations and props
1 parent 5516961 commit a46f958

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

components/Profile1/Email.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
1-
import { StyleSheet, TouchableOpacity, Text, View } from 'react-native'
2-
1+
import React from 'react'
2+
import { StyleSheet, Text, TouchableOpacity, View } from 'react-native'
33
import { Icon } from 'react-native-elements'
44
import PropTypes from 'prop-types'
5-
import React from 'react'
65

76
const styles = StyleSheet.create({
87
container: {

components/Profile1/Profile.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const styles = StyleSheet.create({
3636
paddingBottom: 20,
3737
paddingTop: 35,
3838
},
39-
hearderContainer: {},
39+
headerContainer: {},
4040
headerColumn: {
4141
backgroundColor: 'transparent',
4242
...Platform.select({
@@ -100,9 +100,9 @@ class Contact extends Component {
100100
}).isRequired,
101101
emails: PropTypes.arrayOf(
102102
PropTypes.shape({
103+
email: PropTypes.string.isRequired,
103104
id: PropTypes.number.isRequired,
104105
name: PropTypes.string.isRequired,
105-
email: PropTypes.string.isRequired,
106106
})
107107
).isRequired,
108108
tels: PropTypes.arrayOf(
@@ -141,7 +141,7 @@ class Contact extends Component {
141141
)
142142
}
143143

144-
renderContactHeader = () => {
144+
renderHeader = () => {
145145
const {
146146
avatar,
147147
avatarBackground,
@@ -150,7 +150,7 @@ class Contact extends Component {
150150
} = this.props
151151

152152
return (
153-
<View style={styles.hearderContainer}>
153+
<View style={styles.headerContainer}>
154154
<Image
155155
style={styles.headerBackgroundImage}
156156
blurRadius={10}
@@ -210,7 +210,7 @@ class Contact extends Component {
210210
<ListView
211211
contentContainerStyle={styles.emailContainer}
212212
dataSource={this.state.emailDS}
213-
renderRow={({ id, name, email }, _, k) => {
213+
renderRow={({ email, id, name }, _, k) => {
214214
return (
215215
<Email
216216
key={`email-${id}`}
@@ -229,7 +229,7 @@ class Contact extends Component {
229229
<ScrollView>
230230
<View style={styles.container}>
231231
<Card containerStyle={styles.cardContainer}>
232-
{this.renderContactHeader()}
232+
{this.renderHeader()}
233233
{this.renderTel()}
234234
{Separator()}
235235
{this.renderEmail()}

0 commit comments

Comments
 (0)