diff --git a/src/components/SpellContent.tsx b/src/components/SpellContent.tsx index 7714366c..4832a458 100644 --- a/src/components/SpellContent.tsx +++ b/src/components/SpellContent.tsx @@ -1,6 +1,4 @@ import type { NostrEvent } from '@nostrify/nostrify'; -import { nip19 } from 'nostr-tools'; -import { useNavigate } from 'react-router-dom'; import { Badge } from '@/components/ui/badge'; import { Clock, Globe, Image, Languages, MessageSquareOff, Radio, Search, SortDesc, Terminal, Users, Video, WandSparkles } from 'lucide-react'; import { buildKindOptions } from '@/components/SavedFeedFiltersEditor'; @@ -35,21 +33,19 @@ function formatTimestamp(value: string): string { return value; } +/** Friendly display name for tag filter letters. */ +function tagFilterLabel(letter: string): string { + if (letter === 't') return 'Hashtags'; + return `#${letter}`; +} + interface SpellContentProps { event: NostrEvent; } export function SpellContent({ event }: SpellContentProps) { - const navigate = useNavigate(); const { tags } = event; - const neventId = nip19.neventEncode({ id: event.id, author: event.pubkey, kind: event.kind }); - - const handleRun = (e: React.MouseEvent) => { - e.stopPropagation(); - navigate(`/${neventId}`); - }; - const name = tags.find(([t]) => t === 'name')?.[1]; const cmd = tags.find(([t]) => t === 'cmd')?.[1]; const kinds = tags.filter(([t]) => t === 'k').map(([, v]) => v); @@ -71,16 +67,12 @@ export function SpellContent({ event }: SpellContentProps) { return (