Skip to content

Commit

Permalink
- add showCopy prop to TruncatedAddress component to hide copy button
Browse files Browse the repository at this point in the history
  • Loading branch information
Jennievon committed Aug 21, 2024
1 parent d24c71b commit 670d013
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ const ConnectWalletButton = ({
return walletConnected ? (
<>
<LinkBreak2Icon className="h-4 w-4 mr-1" />
{<TruncatedAddress address={address} />}
{<TruncatedAddress address={address} showCopy={false} />}
</>
) : (
<>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,12 @@ const TruncatedAddress = ({
address,
prefixLength = 6,
suffixLength = 4,
showCopy = true,
}: {
address: string;
prefixLength?: number;
suffixLength?: number;
showCopy?: boolean;
}) => {
const truncatedAddress =
address &&
Expand All @@ -35,7 +37,7 @@ const TruncatedAddress = ({
</TooltipContent>
</Tooltip>
</TooltipProvider>
<Copy value={address} />
{showCopy && <Copy value={address} />}
</div>
) : (
<div>N/A</div>
Expand Down

0 comments on commit 670d013

Please sign in to comment.