feat: open highlight in native app when clicking timestamp

- Click timestamp to open highlight event in user's native Nostr app
- Reuses existing native link logic (nostr:nevent)
- Simple and DRY implementation
This commit is contained in:
Gigi
2025-10-14 11:40:30 +02:00
parent d7906cfb95
commit c9544e0fd2

View File

@@ -320,7 +320,10 @@ export const HighlightItem: React.FC<HighlightItemProps> = ({
<CompactButton
className="highlight-timestamp"
title={new Date(highlight.created_at * 1000).toLocaleString()}
onClick={(e) => e.stopPropagation()}
onClick={(e) => {
e.stopPropagation()
window.location.href = highlightLinks.native
}}
>
{formatDateCompact(highlight.created_at)}
</CompactButton>