-
Notifications
You must be signed in to change notification settings - Fork 2
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
feat: Copy account address to clipboard #91
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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.
This is a sweet nice to have :) nice, @Victor-Salomon 👌
just one comment below
app/src/components/ClipboardCopy.tsx
Outdated
className="flex cursor-pointer items-center space-x-2 text-sm" | ||
> | ||
<p>{content}</p> | ||
<Copy className="h-3 w-3" /> | ||
{isCopyIndicator ? ( | ||
<CopyCheck className="h-3 w-3 text-turtle-primary" /> |
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.
Can you check with @brandon about these colors? I don't feel that purple should be the main colour for this, it draws too much attention to it 👀 I'd say to use a gray tone for the default and then purple of green for when it's active.
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.
Sure, let me do this.
When Noah validates the PR I will merge it and update if Brandon requires some changes.
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.
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 :)
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 refactoring!! Thanks Victor. Left some comments
app/src/components/Account.tsx
Outdated
}: { | ||
network: Network | ||
address: string | ||
transferResult?: TransferResult |
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 do not like the prop transferResult. It has nothing to do with an account. You just need it for some styling right?
Can we replace? Maybe an error prop (boolean).
app/src/components/ClipboardCopy.tsx
Outdated
|
||
function CopyAddress({ content, address }: { content: string; address: string }) { | ||
const { addNotification } = useNotification() | ||
const [isCopyIndicator, setIsCopyIndicator] = useState(false) |
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.
better name suggestion: showCopyIndicator
…ylabs-org/turtle into chore/refactor-account-component
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.
Great work @Victor-Salomon 🥐 👌
className?: string | ||
allowCopy?: boolean |
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.
className?: string | |
allowCopy?: boolean | |
allowCopy?: boolean | |
className?: string |
className, | ||
allowCopy = true, |
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.
className, | |
allowCopy = true, | |
allowCopy = true, | |
className, |
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.
amazing thanks Victor 💯
Create an Account component that includes both the Icon & address and implement it in the ongoing and completed transfer avoiding code duplication.
This component also includes the address copy to the clipboard.
UI includes the well know 'Copy icon' that turns green on copy with a notification from our notification system.
Feel free to let me know if you do not like anything.