-
Notifications
You must be signed in to change notification settings - Fork 45
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: session update and company form submitting issue #161
Conversation
Thank you for following the naming conventions for pull request titles! 🙏 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great find @anikdhabal ❤️ . currently blocking until #167 is figured out because it touches some code in company-form.
// eslint-disable-next-line @typescript-eslint/no-unsafe-return | ||
return newToken; | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we have to pass the profile picture url through jwt callback and session callback.
Thanks Nafees for the review. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@anikdhabal @G3root #167 PR is merged. Please resolve the merge conflict and make necessary changes. It looks good to me and huge props to @anikdhabal for identifying the issue and taking the initiative to resolve it.
Thank @dahal, let me fix that quickly. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, this PR fixed that issue as well. I also explained in detail why the form is not submitting. |
I was testing it on your current PR, also made sure I have the latest commits, still the same issue. |
Thanks puru, I've updated the code. Now Everything is Ok. |
fixes #174
Currently, there are some bugs present."
1.The company form is not submitting because there was an optional field present in the form, and we conditionally render those fields. Since those fields are optional, they will only be typeof string in our case, or undefined when not rendered. However, we set the default values to string and also conditionally not render those fields.
2.It doesn't allow you to switch the company or navigate to the dashboard page after completing the onboarding. This is because of the 'if' block; every time it returns the new token when you update the session.
And we don't need to explicitly write those blocks, as we update the session directly when updating the user profile.