fix: resolve DID to handle on issue detail page
Author: Aaron Steven White
Commit
62cd4dccaa0eecc2d4c69580ddcdd1099287efb2Parent: e0ecb4783a
Structural diff unavailable
These commits were pushed via plain git push, so no pre-parsed
schemas are available. Install git-remote-cospan and re-push via panproto:// to
see scope-level changes, breaking change detection, and semantic diffs.
brew install panproto/tap/git-remote-cospan1 file changed +9 -2
@@ -1,14 +1,21 @@
11 <script lang="ts"> 2+ import { onMount } from 'svelte'; 23 import { getContext } from 'svelte'; 34 import StateBadge from '$lib/components/shared/StateBadge.svelte'; 45 import RichText from '$lib/components/shared/RichText.svelte'; 56 import Timeline from '$lib/components/shared/Timeline.svelte'; 67 import BackLink from '$lib/components/shared/BackLink.svelte'; 8+ import { resolveHandle } from '$lib/api/handle.js'; 79 import { timeAgo } from '$lib/utils/time.js'; 810 911 let { data } = $props(); 1012 1113 let basePath = $derived(`/${data.did}/${data.repo}`); 14+ let authorHandle = $state(''); 15+ 16+ onMount(async () => { 17+ authorHandle = await resolveHandle(data.issue.did); 18+ }); 1219 1320 const repoLayout = getContext<any>('repoLayout'); 1421 $effect(() => {
@@ -34,7 +41,7 @@
3441 3542 <div class="mt-2 flex flex-wrap items-center gap-3 text-sm text-text-secondary"> 3643 <span> 37- {data.issue.did} opened this {timeAgo(data.issue.createdAt)} 44+ {authorHandle || data.issue.did} opened this {timeAgo(data.issue.createdAt)} 3845 </span> 3946 <span>{data.issue.commentCount} comments</span> 4047 </div>
@@ -44,7 +51,7 @@
4451 <div class="mb-6 rounded-lg border border-border bg-surface-1"> 4552 <div class="flex items-center gap-2 border-b border-border px-4 py-2"> 4653 <span class="text-sm font-medium text-text-primary"> 47- {data.issue.did} 54+ {authorHandle || data.issue.did} 4855 </span> 4956 <span class="text-xs text-text-secondary"> 5057 opened {timeAgo(data.issue.createdAt)}