-
Notifications
You must be signed in to change notification settings - Fork 396
adrienne / added close icon and onclickoutside handler for modals in wallet #10203
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
adrienne / added close icon and onclickoutside handler for modals in wallet #10203
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
| const { hide } = useModal(); | ||
| const modalRef = useRef(null); | ||
|
|
||
| useOnClickOutside(modalRef, should_close_on_click_outside ? hide : () => undefined); |
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.
eslint was complaining that i cannot put empty function () => {}, so I put () => undefined instead 😢
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.
I think it is becasue of esLint rule
The silent error handling that it should explicitly return something instead of just inferring at runtime.
cc:@farzin-deriv
|
A production App ID was automatically generated for this PR. (log)
Click here to copy & paste above information. |
|
🚨 Lighthouse report for the changes in this PR:
Lighthouse ran with https://deriv-app-git-fork-adrienne-deriv-wallets-modal-wrapper.binary.sx/ |
|
Changes unknown when pulling 7cf9d67 on adrienne-deriv:wallets-modal-wrapper into ** on binary-com:master**. |
| @@ -0,0 +1,4 @@ | |||
| import WalletModal from './WalletModal'; | |||
| import './WalletModal.scss'; | |||
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.
@yashim-deriv
Do we need to add scss files inside the components instead of index.ts file.
Suggestion needed.
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.
Oh yeah export { default as }
@adrienne-deriv
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.
If there's only 1 component being exported in the folder, usually we can put the css import statement in the index.ts file right?
packages/wallets/src/components/MT5CreatePassword/MT5CreatePassword.tsx
Outdated
Show resolved
Hide resolved
|
SonarCloud Quality Gate failed.
|











Changes:
Please provide a summary of the change.
Screenshots:
Please provide some screenshots of the change.