Skip to content

Commit

Permalink
Reformat code
Browse files Browse the repository at this point in the history
  • Loading branch information
JoeNg93 committed Feb 24, 2019
1 parent 6ab0bc4 commit cad8824
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 20 deletions.
2 changes: 1 addition & 1 deletion front-end/components/OrderHistoryBox.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ const styles = StyleSheet.create({
width: 347,
height: 90,
borderRadius: 11,
paddingHorizontal: 20,
paddingHorizontal: 20,

backgroundColor: Colors.white,
borderBottomWidth: 4,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ class SubscriptionDetailScreen extends React.Component {

splitSampleContent = sampleContent => {
let splitSampleContent = sampleContent.split(CONTENT_SEPARATOR);
return splitSampleContent.map( (text, index) => <Text key={index} style={styles.descriptionContent}>{text}</Text>);
return splitSampleContent.map((text, index) => (
<Text key={index} style={styles.descriptionContent}>
{text}
</Text>
));
};

render() {
Expand Down Expand Up @@ -94,13 +98,13 @@ class SubscriptionDetailScreen extends React.Component {
<View style={{ paddingHorizontal: 40 }}>
<View>
<Text style={styles.descriptionTitle}>ABOUT</Text>
<Text style={[styles.descriptionContent, {marginTop: 10}]}>
<Text style={[styles.descriptionContent, { marginTop: 10 }]}>
{selectedSubscription.longDescription}
</Text>
</View>
<View>
<Text style={styles.descriptionTitle}>SAMPLE CONTENT</Text>
<View style={{marginTop: 10}}>
<View style={{ marginTop: 10 }}>
{this.splitSampleContent(this.mockSampleContent)}
</View>
</View>
Expand Down Expand Up @@ -223,7 +227,7 @@ const styles = StyleSheet.create({
flexDirection: 'row',
alignSelf: 'center',
paddingTop: 3,
marginTop: 88
marginTop: 88,
},
circle: {
marginTop: 6,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ class SubscriptionSelectionScreen extends React.Component {
name={'shopping-basket'}
size={22}
color={Colors.mediumCarmine}
containerStyle={{marginTop: 2}}
containerStyle={{ marginTop: 2 }}
/>
<View
style={[
Expand Down Expand Up @@ -205,7 +205,9 @@ class SubscriptionSelectionScreen extends React.Component {
);
return items;
} else {
return <Text style={styles.noItemText}>Your cart is currently empty.</Text>;
return (
<Text style={styles.noItemText}>Your cart is currently empty.</Text>
);
}
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,20 @@ const styles = StyleSheet.create({
container: {
flex: 1,
marginTop: 40,
paddingHorizontal: 30
paddingHorizontal: 30,
},
scrollContainerContent: {
justifyContent: 'center',
},
textContainer: {
marginTop: 45,
marginBottom: 58,
marginBottom: 58,
},
mainText: {
...commonStyles.fontRalewayBold,
...commonStyles.textMediumCarmine,
fontSize: 24,
},
...commonStyles.fontRalewayBold,
...commonStyles.textMediumCarmine,
fontSize: 24,
},
});


Expand Down Expand Up @@ -77,7 +77,7 @@ export default class OrderHistoryScreen extends React.Component {
deliveryDayOfWeek: 'Wednesday',
deliveryTime: '16:00-18:00',
orderDate: '2019/02/08',
total: 388
total: 388,
},
],
};
Expand Down Expand Up @@ -105,7 +105,7 @@ export default class OrderHistoryScreen extends React.Component {
});
};

render () {
render() {
return (
<ScrollView
showsVerticalScrollIndicator={false}
Expand All @@ -115,11 +115,8 @@ export default class OrderHistoryScreen extends React.Component {
<View style={styles.textContainer}>
<Text style={styles.mainText}>Order History</Text>
</View>

<View>
{this.renderOrderBoxes()}
</View>


<View>{this.renderOrderBoxes()}</View>
</ScrollView>
);
}
Expand Down

0 comments on commit cad8824

Please sign in to comment.