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.
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
Refactor/36648 wallet enablement flow personal info #40357
Refactor/36648 wallet enablement flow personal info #40357
Changes from 37 commits
7c16aa4
6331ddd
2fb2ce4
8876374
07559bd
e8c9058
fc2e134
03111d4
85e77ec
f19d447
647f538
3e7f27d
1e0e3af
ffc26f9
9b665e8
b8e9d43
c135183
4718b80
c888b6f
744c276
042138b
5303251
10bb996
4a050bd
bffc4b6
ec9ed98
d6f65ef
16b2067
c001154
3866998
0711f4c
d88c4e7
5ea49d2
57f1a7b
04c20eb
879287c
67a43b1
e98ef14
cb13e9c
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I am wondering why this extra new hook is required, bcoz to me it seems only adding a nested level from
useReimbursementAccountStepFormSubmit
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.
But it's used also for useWalletAdditionalDetailsStepFormSubmit. I could just have renamed useReimbursementAccountStepFormSubmit to useStepFromSubmit, but everytime for every form I would need to remember to pass the formId and instantiate it with a proper type. Here each form can have it's own hook properly typed and with proper formId passed and I just import the proper hook and I don't need to remember of types or Id.
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.
I got your point, here I would suggest to remove
useReimbursementAccountStepFormSubmit
anduseWalletAdditionalDetailsStepFormSubmit
by using the generic hookuseStepFormSubmit
which you have created. I think passingformId
from the substep components should be fine.For eg. I have tried this in
FullNameStep
and it works fine.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.
@Pujan92 I also didn't want to touch the ReimbursementAccount files in this PR. There are also some other changes in both flows that could be refactored and reused but I've planned to do that after this flow is complete and working.
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.
Ok, I understand your concerns. Maybe at the time of refactoring, we can bring this point over there.
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.
@Pujan92 yeah, of course, I will keep that in mind! thanks!