-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Refactor: isolate requestWorkspaceOwnerChange from Onyx.connect ONYXKEYS.COLLECTION.POLICY #81105
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -42,7 +42,7 @@ function WorkspaceOwnerChangeWrapperPage({route, policy}: WorkspaceOwnerChangeWr | |
| if (policy?.isChangeOwnerFailed || policy?.isChangeOwnerSuccessful) { | ||
| return; | ||
| } | ||
| requestWorkspaceOwnerChange(policyID, currentUserPersonalDetails.accountID, currentUserPersonalDetails.login ?? ''); | ||
| requestWorkspaceOwnerChange(policy, currentUserPersonalDetails.accountID, currentUserPersonalDetails.login ?? ''); | ||
| // eslint-disable-next-line react-hooks/exhaustive-deps | ||
| }, [policyID]); | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ❌ CONSISTENCY-5 (docs)The ESLint rule Additionally, after this refactor, the Suggested fix: Either add // eslint-disable-next-line react-hooks/exhaustive-deps -- This effect should only run once on mount when policyID changes
}, [policyID]);Or update the dependency array to include all dependencies: }, [policyID, policy, currentUserPersonalDetails.accountID, currentUserPersonalDetails.login]);Please rate this suggestion with 👍 or 👎 to help us improve! Reactions are used to monitor reviewer efficiency.
shubham1206agra marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.