-
Notifications
You must be signed in to change notification settings - Fork 480
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
Replace useDispatch with useQuery and request in PatientRegistration form. #7216
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
✅ Deploy Preview for care-egov-staging ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Hey @rithviknishad , In the useQuery block of the Can you please point out what mistake I made? |
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.
Although the reducer state is being updated, the field
from the <Form>
is not being updated. <Form>
already has a reducer to handle form state and errors. And in the Patient Register page we are keeping another reducer to handle form state and errors for the same purpose on top of that. This leads to not having a single source of truth.
Either use <Form>
alone by removing the custom reducer and rely on it's asyncDefaults
prop to pre-fill the form during edit form, or remove the usage of <Form>
and rely on the custom defined reducer alone.
👋 Hi, @sriharsh05, This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there. |
@rithviknishad |
@rithviknishad |
LGTM |
@sriharsh05 We truly appreciate your efforts. Thank you for taking the time to contribute; this is a very valuable contribution to us 🥇. We always welcome your contribution 🙂, so feel free to contribute to anything anytime, and never lose that spirit of innovation 🙌. |
Proposed Changes
useDispatch
w.useQuery
/request
: Patient Registration Form (src/Components/Patient/PatientRegister.tsx
) #7171@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers
Merge Checklist