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

Replaced useDispatch with useQuerry on DailyRoundListDetails #6696

Closed
wants to merge 3 commits into from

Conversation

krushn-a
Copy link

@krushn-a krushn-a commented Nov 23, 2023

WHAT

copilot:

Proposed Changes

@coronasafe/care-fe-code-reviewers @coronasafe/code-reviewers

Merge Checklist

  • Add specs that demonstrate bug / test a new feature.
  • Update product documentation.
  • Ensure that UI text is kept in I18n files.
  • Prep screenshot or demo video for changelog entry, and attach it to issue.
  • Request for Peer Reviews
  • Completion of QA

HOW

🤖[deprecated] Generated by Copilot at b3fea0a

  • Replace dispatch and getConsultationDailyRoundsDetails actions with custom hook useConsultationQuery that uses useQuery and routes.getDailyReport to fetch daily round details in DailyRoundListDetails.tsx (link, link, link, link)
  • Add optional chaining operators (?.) to access current_health and medication_given properties of res.data object in DailyRoundListDetails.tsx to prevent errors when they are null or undefined (link, link)
  • Import DailyRoundsModel type from models module and use it to define response type of routes.getDailyReport object in api.tsx (link, link)
  • Add method property to routes.getDailyReport object in api.tsx to specify GET request (link)

@krushn-a krushn-a requested a review from a team November 23, 2023 15:23
@krushn-a krushn-a requested a review from a team as a code owner November 23, 2023 15:23
Copy link

vercel bot commented Nov 23, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
care-storybook ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 4, 2023 9:42am

Copy link

netlify bot commented Nov 23, 2023

Deploy Preview for care-egov-staging ready!

Name Link
🔨 Latest commit 9b99a5e
🔍 Latest deploy log https://app.netlify.com/sites/care-egov-staging/deploys/656d9eaca033a5000848ebfa
😎 Deploy Preview https://deploy-preview-6696--care-egov-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

src/Components/Patient/DailyRoundListDetails.tsx Outdated Show resolved Hide resolved
src/Components/Patient/DailyRoundListDetails.tsx Outdated Show resolved Hide resolved
src/Components/Patient/DailyRoundListDetails.tsx Outdated Show resolved Hide resolved
src/Components/Patient/DailyRoundListDetails.tsx Outdated Show resolved Hide resolved
src/Components/Patient/DailyRoundListDetails.tsx Outdated Show resolved Hide resolved
@github-actions github-actions bot added the merge conflict pull requests with merge conflict label Nov 24, 2023
Copy link

👋 Hi, @krushn-a,
Conflicts have been detected against the base branch. Please rebase your branch against the base branch.


This message is automatically generated by prince-chrismc/label-merge-conflicts-action so don't hesitate to report issues/improvements there.

@krushn-a
Copy link
Author

Capture

As directed i have inlined the useQuery and removed the useState . when i try to fetch the data and get res.data an error message shows up Property 'data' does not exist on type 'Response' I tried to fix this but couldn't able to do it. Could you please help me with it.

@rithviknishad
Copy link
Member

you should be doing:

const { res, data, loading } = useQuery(...);

Copy link
Member

@rithviknishad rithviknishad left a comment

Choose a reason for hiding this comment

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

  1. Data is not being used anywhere, right?
  2. What exactly does fetchpatient do? I don't see it doing any data fetching.

@rithviknishad
Copy link
Member

@krushn-a Kindly have a look at the example PR's referenced in the useQuery EPIC issue.

Copy link

github-actions bot commented Dec 4, 2023

Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 4, 2023
@krushn-a
Copy link
Author

krushn-a commented Dec 4, 2023

I have gone through the refrences and put all my effort to make appropiate changes, i hope it will pass.

@krushn-a
Copy link
Author

krushn-a commented Dec 4, 2023

I am continuing to make changes in other files also

@github-actions github-actions bot removed the stale label Dec 5, 2023
Copy link

Hi, This pr has been automatically marked as stale because it has not had any recent activity. It will be automatically closed if no further activity occurs for 7 more days. Thank you for your contributions.

@github-actions github-actions bot added the stale label Dec 13, 2023
@nihal467
Copy link
Member

@krushn-a what is the status on this PR

cc: @rithviknishad

Copy link

Hi, @gigincg, @nihal467, @khavinshankar, @mathew-alex, This pr has been automatically closed because it has not had any recent activity. Thank you for your contributions. Feel free to repopen the pr.

@github-actions github-actions bot closed this Dec 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merge conflict pull requests with merge conflict stale
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants