-
Notifications
You must be signed in to change notification settings - Fork 3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added New Screens to allow the ability to add potlucks. #49
Conversation
js/components/InfoForm/index.js
Outdated
getValueInOnChange: (text) => text, | ||
debounce: 500, | ||
}, | ||
Theme: { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this one uppercase?
onChangeHandler: 'onChangeText', | ||
props: { | ||
placeholder: 'Potluck Name', | ||
style: styles.login |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice.
js/components/InfoForm/index.js
Outdated
}, | ||
} | ||
super(fields); | ||
this.state.date = new Date() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use newlines to separate concerns. the call to super
should have a newline after it
js/components/InfoForm/index.js
Outdated
this.state.arriveTime = new Date() | ||
this.state.servingTime = new Date() | ||
} | ||
onDateChange = (date) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add newlines between methods
js/components/InfoForm/index.js
Outdated
arriveTime: time | ||
}) | ||
} | ||
onServingTimeChange = (time) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation
|
||
class FoodScreenContainer extends Component { | ||
constructor() { | ||
super() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't define a constructor you don't need to call super
onChangeText={(text) => { | ||
(onTextChange(text)) | ||
}} /> | ||
<View> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indentation is 1 too deep here
<View style={styles.buttonContainer}> | ||
<TouchableHighlight | ||
style={[styles.button, styles.inactive]} | ||
onPress={() => (onIncrease())} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function name is weird here. On press, you increase, right? So it should be:
onPress={() => (increase())}
When you name something on[Action] the function should be an event handler.
</TouchableHighlight> | ||
<TouchableHighlight | ||
style={[styles.button, styles.active]} | ||
onPress={() => (onDecrease())} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See above.
constructor() { | ||
super() | ||
this.state = { | ||
text: 0 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should it be called text
? Or count
?
Added 4 Screens to add potlucks. Closes #13