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

fix: session update and company form submitting issue #161

Merged
merged 8 commits into from
Mar 8, 2024

Conversation

anikdhabal
Copy link
Contributor

@anikdhabal anikdhabal commented Mar 3, 2024

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.

Screenshot 2024-03-03 201250

And we don't need to explicitly write those blocks, as we update the session directly when updating the user profile.

Screenshot 2024-03-03 201352

Copy link

github-actions bot commented Mar 3, 2024

Thank you for following the naming conventions for pull request titles! 🙏

Copy link
Collaborator

@G3root G3root left a 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;
}

Copy link
Collaborator

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.

@anikdhabal
Copy link
Contributor Author

anikdhabal commented Mar 5, 2024

Great find @anikdhabal ❤️ . currently blocking until #167 is figured out because it touches some code in company-form.

Thanks Nafees for the review.

Copy link
Contributor

@dahal dahal left a 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.

@anikdhabal
Copy link
Contributor Author

@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.

Copy link
Contributor

@dahal dahal left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Company create or update flow seems to be broken? Please take a look at this, its not sending a TRPC request.

company-create-update-flow

@anikdhabal
Copy link
Contributor Author

anikdhabal commented Mar 7, 2024

Company create or update flow seems to be broken? Please take a look at this, its not sending a TRPC request.

Yeah, this PR fixed that issue as well. I also explained in detail why the form is not submitting.

@dahal
Copy link
Contributor

dahal commented Mar 7, 2024

Company create or update flow seems to be broken? Please take a look at this, its not sending a TRPC request.

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.

@anikdhabal
Copy link
Contributor Author

Company create or update flow seems to be broken? Please take a look at this, its not sending a TRPC request.

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.

@dahal dahal merged commit ef2d56d into captableinc:main Mar 8, 2024
2 checks passed
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.

Switching between the company seems to be broken
3 participants