Auth - #30
Open
bigcheeseh wants to merge 18 commits into
Open
Conversation
Kronenberg
reviewed
Jan 27, 2018
| } | ||
|
|
||
| componentWillMount(){ | ||
| const user = JSON.parse(localStorage.getItem("user")) |
Owner
There was a problem hiding this comment.
If i am right, u can find all user data in firebase reducer, check it out.
Kronenberg
reviewed
Jan 27, 2018
| componentWillReceiveProps(nextProps){ | ||
| const user = JSON.parse(localStorage.getItem("user")) | ||
| console.log(user) | ||
| this.setState({ user }) |
Owner
There was a problem hiding this comment.
set state in componentWillMount and here?
why u set same user data twice?
Kronenberg
reviewed
Jan 27, 2018
| } | ||
| } | ||
|
|
||
| case TYPES.CREATE_ACCOUNT_TO_INITIAL_ERROR: { |
Kronenberg
reviewed
Jan 27, 2018
|
|
||
| if(!action.payload){ | ||
| console.log('group list is empty') | ||
| }else{ |
Kronenberg
reviewed
Jan 27, 2018
| <Route exact path='/:groupTitle' component={GroupPage} /> | ||
| <Route path='/programs' component={Programs} /> | ||
| <Route path='/chat' component={Chat} /> | ||
| <Route exact path='/administration/register' component={Register} /> |
Owner
There was a problem hiding this comment.
administrator register?
u have logic for admins?
Kronenberg
previously approved these changes
Jan 27, 2018
Kronenberg
left a comment
Owner
There was a problem hiding this comment.
Resolve the conflicts and push :D
Kronenberg
reviewed
Jan 27, 2018
| firebase.auth().createUserWithEmailAndPassword(email, password) | ||
| .then((userData) => { | ||
|
|
||
| localStorage.setItem("user", JSON.stringify({ email, "registration": true, "login": false })) |
Owner
There was a problem hiding this comment.
ребят, я вам в прошлый раз говорил что именно надо сохранять если вы внимательно слушали!
нужно сохранять только токен юзера и все! то что вы делаете это bad practice, объекты сохранять это не кошерно! :( очень плохо
Kronenberg
reviewed
Jan 27, 2018
| .then((userData)=>{ | ||
|
|
||
| // add this user to local storage | ||
| localStorage.setItem("user", JSON.stringify({ email, "registration": true, "login": false })) |
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.