mirror of
https://github.com/dergigi/boris.git
synced 2026-01-02 06:24:20 +01:00
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:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user