Skip to content
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

Unify components for account name and address #1151

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ebma
Copy link
Member

@ebma ebma commented Oct 6, 2020

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.

@@ -94,7 +96,7 @@ interface AddressProps {
}

// tslint:disable-next-line no-shadowed-variable
export const Address = React.memo(function Address(props: AddressProps) {
const BasicAddress = React.memo(function BasicAddress(props: BasicAddressProps) {
Copy link
Contributor

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?

Copy link
Member Author

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 👍

} else {
return (
<>
<PublicKey publicKey={props.publicKeys[0]} testnet={props.testnet} variant="short" />{" "}
<Address address={props.publicKeys[0]} testnet={props.testnet} />{" "}
Copy link
Contributor

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"?

Copy link
Member Author

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.

@andywer
Copy link
Contributor

andywer commented Apr 7, 2021

@ebma This PR wants to be rebased 😉

@ebma ebma force-pushed the feature/277-merge-accountname-and-publickey branch from 6d870c2 to bf9cbb0 Compare April 7, 2021 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Merge <AccountName> and <PublicKey>
2 participants