Skip to content

Commit

Permalink
Add truncation to displayed IP in CopyableIp (#2598)
Browse files Browse the repository at this point in the history
  • Loading branch information
charliepark authored Jan 7, 2025
1 parent d144e7d commit 48e1b15
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/ui/lib/CopyableIp.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,18 +8,18 @@
import { CopyToClipboard } from '~/ui/lib/CopyToClipboard'

export const CopyableIp = ({ ip, isLinked = true }: { ip: string; isLinked?: boolean }) => (
<span className="flex items-center gap-1">
<span className="flex max-w-full items-center gap-1">
{isLinked ? (
<a
className="link-with-underline text-sans-md"
className="link-with-underline truncate text-sans-md"
href={`https://${ip}`}
target="_blank"
rel="noreferrer"
>
{ip}
</a>
) : (
ip
<span className="truncate">{ip}</span>
)}
<CopyToClipboard text={ip} />
</span>
Expand Down

0 comments on commit 48e1b15

Please sign in to comment.