diff --git a/src/views/search.tsx b/src/views/search.tsx index 32f04a9..05bbaa8 100644 --- a/src/views/search.tsx +++ b/src/views/search.tsx @@ -178,7 +178,7 @@ const RepoContextLink: Component<{ repoDid: Did }> = (props) => { const RepoThreadLink: Component<{ kind: 'issue' | 'pull'; repoDid: Did; - ref: string; + threadRef: string; children: JSX.Element; }> = (props) => { const repoQuery = createQuery(() => ({ @@ -189,7 +189,8 @@ const RepoThreadLink: Component<{ const href = createMemo(() => { const repo = repoQuery.data; if (!repo) return undefined; - return props.kind === 'issue' ? issueHref(repo, props.ref) : pullHref(repo, props.ref); + const fn = props.kind === 'issue' ? issueHref : pullHref; + return fn(repo, props.threadRef); }); return ( @@ -222,7 +223,7 @@ const CommentParentLink: Component<{ hit: SearchHit }> = (props) => { ? (parent().record.value as { repo: Did }).repo : (parent().record.value as { target: { repo: Did } }).target.repo); return ( - + comment on {parent().kind} ); @@ -296,12 +297,12 @@ const ResultTitle: Component<{ hit: SearchHit }> = (props) => { - + {title()} - + {title()}