2024-08-20 20:20:45 +00:00
|
|
|
<script lang="ts">
|
2025-11-11 21:39:32 +00:00
|
|
|
import {removeUndefined} from "@welshman/lib"
|
2025-06-05 19:25:55 +00:00
|
|
|
import {displayPubkey} from "@welshman/util"
|
|
|
|
|
import {deriveHandleForPubkey, displayHandle, deriveProfileDisplay} from "@welshman/app"
|
|
|
|
|
import WotScore from "@app/components/WotScore.svelte"
|
2025-01-02 18:04:28 +00:00
|
|
|
import ProfileCircle from "@app/components/ProfileCircle.svelte"
|
2024-08-22 23:16:35 +00:00
|
|
|
|
2025-04-15 18:03:27 +00:00
|
|
|
type Props = {
|
|
|
|
|
value: string
|
|
|
|
|
url?: string
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
const {value, url}: Props = $props()
|
2024-10-17 17:34:13 +00:00
|
|
|
|
2025-02-05 03:37:59 +00:00
|
|
|
const pubkey = value
|
2025-11-11 21:39:32 +00:00
|
|
|
const profileDisplay = deriveProfileDisplay(pubkey, removeUndefined([url]))
|
2024-10-17 17:34:13 +00:00
|
|
|
const handle = deriveHandleForPubkey(pubkey)
|
2024-08-20 20:20:45 +00:00
|
|
|
</script>
|
|
|
|
|
|
2024-10-17 17:34:13 +00:00
|
|
|
<div class="flex max-w-full gap-3">
|
|
|
|
|
<div class="py-1">
|
2025-04-15 18:03:27 +00:00
|
|
|
<ProfileCircle {pubkey} {url} />
|
2024-10-17 17:34:13 +00:00
|
|
|
</div>
|
|
|
|
|
<div class="flex min-w-0 flex-col">
|
|
|
|
|
<div class="flex items-center gap-2">
|
2025-01-02 18:04:28 +00:00
|
|
|
<div class="text-bold overflow-hidden text-ellipsis text-base">
|
2024-10-17 17:34:13 +00:00
|
|
|
{$profileDisplay}
|
|
|
|
|
</div>
|
2025-06-05 19:25:55 +00:00
|
|
|
<WotScore {pubkey} />
|
2024-10-17 17:34:13 +00:00
|
|
|
</div>
|
|
|
|
|
<div class="overflow-hidden text-ellipsis text-sm opacity-75">
|
|
|
|
|
{$handle ? displayHandle($handle) : displayPubkey(pubkey)}
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|