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

change a regex and contents on Redirect on login chapter #285

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

pobch
Copy link
Contributor

@pobch pobch commented Oct 23, 2018

  • We always call queryString() with "redirect" as an argument, so I think it's not necessary to use regex to escape special characters on name variable. (and you forgot to put regex special characters in the braces)
  • We want to capture a value after = to results[2], so it's not necessary to capture & or # or $ to results[1].
  • I'm not sure for this point. As my understanding, a string value of window.location.href is encoded by encodeURI(), not encodeURIComponent. So, we should use decodeURI to decode it.
  • We also wrap Signup component with UnauthenticatedRoute which takes responsibility for redirecting. So we should remove a redirecting logic in Signup to prevent conflicts.

@jayair
Copy link
Contributor

jayair commented Oct 28, 2018

Thanks for simplifying the regex.

We also wrap Signup component with UnauthenticatedRoute which takes responsibility for redirecting. So we should remove a redirecting logic in Signup to prevent conflicts.

Not sure I follow what you mean here. I don't see the change that you made?

@pobch
Copy link
Contributor Author

pobch commented Oct 28, 2018

Thanks for simplifying the regex.

We also wrap Signup component with UnauthenticatedRoute which takes responsibility for redirecting. So we should remove a redirecting logic in Signup to prevent conflicts.

Not sure I follow what you mean here. I don't see the change that you made?

I added the content on line 55

@jayair
Copy link
Contributor

jayair commented Oct 30, 2018

Got it. Thanks. I'll merge this after I make this change in the repo.

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.

2 participants