Last active
June 5, 2016 21:53
-
-
Save darjanin/b7b03a309ed3a7aebb740d1b7834335f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
showUser(userId){ | |
if (this.state.loggedIn) { | |
this.setState({ | |
userToShow: userId || databaseUtils.getUserInfo().uid | |
}) | |
this.changePage('user') | |
} | |
} | |
// maybe | |
showUser(userId){ | |
if (this.state.loggedIn) { | |
this.setState({ | |
userToShow: userId || databaseUtils.getUserInfo().uid, | |
page: 'user', | |
}) | |
} | |
} | |
// old | |
showUser(userId){ | |
if (!userId && !this.state.loggedIn) return | |
if (!userId) userId = databaseUtils.getUserInfo().uid | |
console.log(userId) | |
this.setState({ | |
userToShow: userId | |
}) | |
this.changePage('user') | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment