Skip to content
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

fix(profile): navigate to AuthProfile for current user #263

Conversation

wndisra
Copy link
Contributor

@wndisra wndisra commented Aug 16, 2017

Closes #247

  • Make UserListItem component stateful
  • Map the component to state.auth.user
  • Navigate the current user to AuthProfileScreen

>
<ImageContainerComponent
style={styles.avatarContainer}
const CorrectScreen =
Copy link
Member

@lex111 lex111 Aug 16, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable names are written in lowerCamelCase. And it's better to call the variable userScreen.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, my bad. I'll fix it

Copy link
Member

@lex111 lex111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything is fine, small things need to be fixed.

onPress={() =>
navigation.navigate('Profile', {
navigation.navigate(CorrectScreen ? 'AuthProfile' : 'Profile', {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can just left CorrectScreen, because we store the name of the screen, then you do not need a ternary operator.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Got it

<ImageContainerComponent
style={styles.avatarContainer}
onPress={() =>
navigation.navigate(CorrectScreen ? 'AuthProfile' : 'Profile', {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Similarly, see above.

@andrewda andrewda changed the title 247 navigate to authprofilescreen for current user fix(profile): navigate to AuthProfile for current user Aug 16, 2017
Copy link
Member

@andrewda andrewda left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👌

Copy link
Member

@housseindjirdeh housseindjirdeh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Beautiful 😍 thank you matey!

@housseindjirdeh housseindjirdeh merged commit bfad60c into gitpoint:master Aug 16, 2017
@wndisra wndisra deleted the 247-navigate-to-authprofilescreen-for-current-user branch August 17, 2017 18:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants