Open cmosguy opened 8 years ago
Hi. I will prepare PR for you with fixes. You probably go in right direction so this should not be hard :-) I think I can find some time in next 24 hours
Hi, sorry for delay.
credentialsRequired: false
doesn't look as best validation method, this way you can only say that token not expired... setMe
for every decoded token. This looks good fine if you verify token on your backend..Please, look at #7 and respect rules in .editorconfig
and in package.json
for eslint, run npm run lint
before you commit, it is really useful for cooperation.. :-)
@langpavel ok so I went in and edited all the .editorconfig
files you requested. I also have added the .git/hooks/pre-commit
hook to run the npm run eslint
before all commits.
The problem I had so far was that I:
require('dotenv')
within the config.js file. dotenv
package will only work on the server so I do not think I am doing this correctly.dispatch(setMe)
properly. If the token has expire (like you mentioned) or is not valid, I do not want to fetch any data. I think I need to do a session because I really do not understand how to realize this. If you can edit code it would be awesome, but I am really stuck here.I do not understand what I need to do in order to facilitate the error: TypeError: Cannot read property 'me' of null
Can we please work through the code together? or do you have ideas here what I am doing incorrectly?
Thanks Pavel! Adam
@langpavel I am having an issue resolving my me component. I made some updates to the code, so here is what you need to know:
I used the setIntl to help me figure out how to architect and setup the me objects. But I am stuck on getting an error if you look in the browser that me is null. I don't understand how to organize and setup me if there is not initial valid token. How do I go about doing this correctly?
I also uncommented the
<Me>
component fromnavigation.js
but I still have not figured out how to resolve theme.js
action to work properly in the initial state situation.Thanks!