-
Notifications
You must be signed in to change notification settings - Fork 585
Enforce react-hooks/exhaustive-deps lint rule #2138
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
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 |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
"eslint-config-thirdweb": patch | ||
"@thirdweb-dev/react": patch | ||
--- | ||
|
||
Enforce react-hooks/exhaustive-deps lint rule |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -50,5 +50,8 @@ module.exports = { | |
], | ||
}, | ||
], | ||
|
||
// react | ||
"react-hooks/exhaustive-deps": "error", | ||
}, | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -141,7 +141,7 @@ export const PaperCheckout = <T extends ContractType>({ | |
return () => { | ||
window.removeEventListener("message", handleMessage); | ||
}; | ||
}, []); | ||
}, [onCloseCheckout, onPaymentSuccess, onTransferSuccess]); | ||
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. this one is fine |
||
|
||
// Build iframe URL with query params. | ||
const checkoutUrl = new URL(`/checkout/${checkoutId}`, PAPER_APP_URL); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -84,7 +84,7 @@ export const VerifyOwnershipWithPaper: React.FC< | |
return () => { | ||
window.removeEventListener("message", handleMessage); | ||
}; | ||
}, []); | ||
}, [onError, onSuccess, onWindowClose]); | ||
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. this one is fine |
||
|
||
const url = new URL("/sdk/v1/login-with-paper", PAPER_APP_URL); | ||
url.searchParams.append("chainName", chainNameToUse); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -36,7 +36,7 @@ export const Modal: React.FC<{ | |
return () => { | ||
document.removeEventListener("keydown", keyDownHandler); | ||
}; | ||
}, []); | ||
}, [escapeToClose, onClose]); | ||
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. this one is fine |
||
|
||
const additionalDialogClasses = isFullScreen ? "" : dialogContainedClasses; | ||
const dialogPanelBg = isFullScreen ? "transparent" : bgColor; | ||
|
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.
this one needs a deeper look