summaryrefslogtreecommitdiff
path: root/gui/src/components/post/Header.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'gui/src/components/post/Header.tsx')
-rw-r--r--gui/src/components/post/Header.tsx7
1 files changed, 5 insertions, 2 deletions
diff --git a/gui/src/components/post/Header.tsx b/gui/src/components/post/Header.tsx
index 5898eba..21c4f6c 100644
--- a/gui/src/components/post/Header.tsx
+++ b/gui/src/components/post/Header.tsx
@@ -13,13 +13,16 @@ function Header(props: PostProps) {
function openThread(e: React.MouseEvent) {
e.stopPropagation();
const sel = window.getSelection()?.toString();
- if (!sel) navigate(`/t/${poast.host}/${poast.id}`);
+ const id = "urbit" in props.user ? poast.id : poast.hash;
+ if (!sel) navigate(`/t/${poast.host}/${id}`);
}
const { poast } = props;
const name = profile ? (
profile.name
+ ) : "urbit" in props.user ? (
+ <p className="p-only">{props.user.urbit}</p>
) : (
- <p className="p-only">{poast.author}</p>
+ <p className="p-only">{props.user.nostr}</p>
);
return (
<header>