Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
Improve display of links to deployments
Browse files Browse the repository at this point in the history
  • Loading branch information
LL782 committed Oct 4, 2024
1 parent bfc192d commit dd86ec4
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 10 deletions.
5 changes: 5 additions & 0 deletions developer-preview/public/assets/external-link.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 11 additions & 8 deletions developer-preview/src/app/ContractInfo.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,17 @@ export const ContractInfo = ({ data }: { data: PreviewData }) => {
<UI.InputText>{data.contract.name}</UI.InputText>

{data.contract.deployments.map(({ address }: Deploymnent) => (
<UI.GreyLink
href={`https://etherscan.io/address/${address}`}
key={address}
title={address}
target="_blank"
>
{formatShortAddress(address)}
</UI.GreyLink>
<>
{" "}
<UI.GreyLink
href={`https://etherscan.io/address/${address}`}
key={address}
title={address}
target="_blank"
>
{formatShortAddress(address)}
</UI.GreyLink>
</>
))}
</div>
</UI.FauxInput>
Expand Down
5 changes: 3 additions & 2 deletions developer-preview/src/ui/UI.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,9 @@ export const UI = {
}: Omit<React.AnchorHTMLAttributes<HTMLAnchorElement>, "className"> & {
children: string;
}) => (
<a className="text-sm text-tool-neutral-70" {...props}>
{children}
<a className="flex gap-1 text-sm text-tool-neutral-70" {...props}>
{children}{" "}
<Image alt="" src="/assets/external-link.svg" width={16} height={16} />
</a>
),
Label: ({ children }: { children: string }) => (
Expand Down

0 comments on commit dd86ec4

Please sign in to comment.