feat: add button to support in modal blocked address#2884
feat: add button to support in modal blocked address#2884
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR adds a "Get support" button to the blocked address modal, allowing users to open the support feedback dialog with a pre-filled message containing their blocked wallet address. The implementation follows an existing pattern used in other parts of the application (such as Error.tsx), utilizing the root store to manage the feedback dialog state.
Changes:
- Added support button integration to AddressBlockedModal component using the feedback system
- Updated localization file to add reference for the "Get support" message
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| src/components/AddressBlockedModal.tsx | Added "Get support" button with handler that opens feedback modal with prefilled message containing blocked wallet address |
| src/locales/en/messages.po | Added localization reference for "Get support" text in AddressBlockedModal context |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| setSupportPrefillMessage(template); | ||
| setFeedbackOpen(true); | ||
| close(); |
There was a problem hiding this comment.
The close() function is called but not defined. Unlike other modals in the codebase (such as Error.tsx), this component doesn't use the useModalContext hook to obtain the close function. Since AddressBlockedModal is designed to be non-dismissable (as indicated by the comment on line 23), calling close() here appears to be a copy-paste error from Error.tsx. This will cause a runtime error when the Get Support button is clicked. Consider removing the close() call, as the modal should remain open when the support feedback dialog opens.
| close(); |
|
📦 Next.js Bundle Analysis for aave-uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
|
📦 Next.js Bundle Analysis for aave-uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
📦 Next.js Bundle Analysis for aave-uiThis analysis was generated by the Next.js Bundle Analysis action. 🤖 This PR introduced no changes to the JavaScript bundle! 🙌 |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
|
|
||
| setSupportPrefillMessage(template); | ||
| setFeedbackOpen(true); | ||
| close(); |
There was a problem hiding this comment.
close() is called in handleGetSupport, but there is no close in scope (no prop and no useModalContext() hook), so this will fail to compile. Either import/use useModalContext (like TxErrorView does) and call its close, or remove the call if the blocked modal is intended to stay open while the Support modal opens.
| close(); |
| ); | ||
| const handleGetSupport = () => { | ||
| const walletAddress = address ? address : 'Address not available'; | ||
| const template = `Unable to Connect:\n\n"${walletAddress}"`; |
There was a problem hiding this comment.
The support prefill template is hard-coded to Unable to Connect even when isError is true and the UI title shows Connection Error. Consider generating the template based on isError (and potentially including any available error context) so the message aligns with what the user is seeing.
| const template = `Unable to Connect:\n\n"${walletAddress}"`; | |
| const title = isError ? 'Connection Error' : 'Unable to Connect'; | |
| const template = `${title}:\n\n"${walletAddress}"`; |
General Changes
Developer Notes
Add any notes here that may be helpful for reviewers.
Reviewer Checklist
Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.
.env.examplefile as well as the pertinant.github/actions/*files