-
Notifications
You must be signed in to change notification settings - Fork 505
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
chore(refactor): refactor mobile modal & fix phone dropdown #6294
Conversation
@@ -91,8 +92,6 @@ class PhoneNumberBox extends React.Component { | |||
defaultCountry={countryCode} | |||
preferredCountries={['us', 'gb']} | |||
css={['intl-tel-input', 'form-control']} | |||
utilsScript='libphonenumber.js' | |||
placeholder='555-555-5555' |
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.
Removing the placeholder makes the component generate placeholders according to the selected country
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.
that is even better, we will have exact format based on the country 👍
@@ -0,0 +1,43 @@ | |||
import React from 'react' |
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.
Both MobileNumberAdd
and MobileNumberChange
are almost exactly the same, but due to them being used in different places sometimes and having custom analytics, I cannot merge them yet
@@ -136,7 +136,7 @@ | |||
"react-dropzone": "7.0.1", | |||
"react-idle-timer": "5.2.0", | |||
"react-intl": "5.24.4", | |||
"react-intl-tel-input": "5.0.7", | |||
"react-intl-tel-input": "8.2.0", |
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.
nice
@@ -110,7 +109,7 @@ class PhoneNumberBox extends React.Component { | |||
} | |||
|
|||
PhoneNumberBox.propTypes = { | |||
countryCode: PropTypes.object.isRequired | |||
countryCode: PropTypes.string |
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'm just curious was it really hard to migrate it to ts?
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.
Wanted to focus on the modals and then if necessary go through the components folder - always trying to balance the "make this repo better" with "this will be replaced not so far in the future"
New Issues
Fixed Issues
|
packages/blockchain-wallet-v4-frontend/src/modals/Mobile/MobileNumberAdd/template.tsx
Outdated
Show resolved
Hide resolved
I tested this on the staging but BE seems to fails when I try to add/update phone number with error 500. I did reported this, we should double check is all working before release |
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.
code lgtm
No description provided.