-
Notifications
You must be signed in to change notification settings - Fork 60
Unify components for account name and address #1151
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: master
Are you sure you want to change the base?
Conversation
src/Generic/components/Address.tsx
Outdated
|
|
||
| // tslint:disable-next-line no-shadowed-variable | ||
| export const Address = React.memo(function Address(props: AddressProps) { | ||
| const BasicAddress = React.memo(function BasicAddress(props: BasicAddressProps) { |
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.
The name BasicAddress isn't great as it raises more questions than it answers. Tricky to find a better one, but how about AddressContent?
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 agree that the name is bad. AddressContent sounds reasonable 👍
| return ( | ||
| <> | ||
| <PublicKey publicKey={props.publicKeys[0]} testnet={props.testnet} variant="short" />{" "} | ||
| <Address address={props.publicKeys[0]} testnet={props.testnet} />{" "} |
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.
Don't we still need to keep the variant="short"?
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 decided to set variant to "short" by default because we almost always use "short" anyways.
|
@ebma This PR wants to be rebased 😉 |
Unify PublicKey, Address and AccountName
6d870c2 to
bf9cbb0
Compare
Group all components related to showing a public key or address under a new
<Address>component which conditionally renders the best component based on props.Closes #277.