Closed shivankacker closed 1 week ago
The changes in the ConsultationDetails
component involve a refactor of the tabs
management system. The previous implementation used the useState
hook for dynamic updates, which has been replaced with a direct initialization of tabs
as a merged object of defaultTabs
and pluginTabs
. This adjustment simplifies the control flow by removing the useEffect
that updated tabs
based on pluginTabs
. The logic for determining the active tab has also been streamlined, enhancing the efficiency of the component while maintaining its overall functionality.
File | Change Summary |
---|---|
src/components/Facility/ConsultationDetails/index.tsx |
Refactored tabs management by removing useState and useEffect ; initialized tabs directly from defaultTabs and pluginTabs . Streamlined logic for determining active tab. |
Objective | Addressed | Explanation |
---|---|---|
Eliminate infinite use effect recursions (#9099) | β |
tested
In the land of tabs, where rabbits hop,
Weβve tidied up the code, made it stop!
No more loops that spin and twirl,
Just simple logic to make it swirl.
With a hop and a skip, the changes are done,
Now the Consultation page can have some fun! πβ¨
[!WARNING] There were issues while running some tools. Please review the errors and either fix the toolβs configuration or disable the tool if itβs a critical failure.
π§ eslint
> If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.src/components/Facility/ConsultationDetails/index.tsx
Oops! Something went wrong! :( ESLint: 8.57.1 Error: Failed to load parser '@typescript-eslint/parser' declared in '.eslintrc.json': Cannot find module '@typescript-eslint/parser' Require stack: - /.eslintrc.json at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15) at Function.resolve (node:internal/modules/helpers:145:19) at Object.resolve (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2346:46) at ConfigArrayFactory._loadParser (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3325:39) at ConfigArrayFactory._normalizeObjectConfigDataBody (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3099:43) at _normalizeObjectConfigDataBody.next () at ConfigArrayFactory._normalizeObjectConfigData (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3040:20) at _normalizeObjectConfigData.next ( ) at ConfigArrayFactory.loadInDirectory (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:2886:28) at CascadingConfigArrayFactory._loadConfigInAncestors (/node_modules/@eslint/eslintrc/dist/eslintrc.cjs:3871:46)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
Name | Link |
---|---|
Latest commit | 4a56fbe08f368282523b35e1fa3eabe54f519d1b |
Latest deploy log | https://app.netlify.com/sites/care-ohc/deploys/67348e2599055b0008d548ed |
Deploy Preview | https://deploy-preview-9100--care-ohc.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Latest commit: |
4a56fbe
|
Status: | β Deploy successful! |
Preview URL: | https://d3139334.care-fe.pages.dev |
Branch Preview URL: | https://tabs-deps-bug.care-fe.pages.dev |
Passed #3903
•
4a56fbe08f: Fix bug with recursion
Project |
CARE
|
Branch Review |
tabs-deps-bug
|
Run status |
Passed #3903
|
Run duration | 04m 52s |
Commit |
4a56fbe08f: Fix bug with recursion
|
Committer | Shivank Kacker |
View all properties for this run βοΈ |
Test results | |
---|---|
Failures |
0
|
Flaky |
0
|
Pending |
0
|
Skipped |
0
|
Passing |
126
|
View all changes introduced in this branch βοΈ |
@shivankacker @shivankacker Your efforts have helped advance digital healthcare and TeleICU systems. :rocket: Thank you for taking the time out to make CARE better. We hope you continue to innovate and contribute; your impact is immense! :raised_hands:
Proposed Changes
@ohcnetwork/care-fe-code-reviewers
Merge Checklist
Summary by CodeRabbit