diff --git a/src/components/nostr/kinds/SpellRenderer.tsx b/src/components/nostr/kinds/SpellRenderer.tsx index 92eca03..0207d4a 100644 --- a/src/components/nostr/kinds/SpellRenderer.tsx +++ b/src/components/nostr/kinds/SpellRenderer.tsx @@ -223,7 +223,14 @@ export function SpellDetailRenderer({ event }: BaseEventProps) { return (
{spell.description}
)} diff --git a/src/components/nostr/kinds/SpellbookRenderer.tsx b/src/components/nostr/kinds/SpellbookRenderer.tsx index 0c7aa68..b3c29bd 100644 --- a/src/components/nostr/kinds/SpellbookRenderer.tsx +++ b/src/components/nostr/kinds/SpellbookRenderer.tsx @@ -5,7 +5,7 @@ import { ClickableEventTitle, } from "./BaseEventRenderer"; import { parseSpellbook } from "@/lib/spellbook-manager"; -import { SpellbookEvent } from "@/types/spell"; +import { SpellbookEvent, ParsedSpellbook } from "@/types/spell"; import { NostrEvent } from "@/types/nostr"; import { BookHeart, Layout, ExternalLink, Play, Eye, Share2 } from "lucide-react"; import { Button } from "@/components/ui/button"; @@ -14,6 +14,23 @@ import { toast } from "sonner"; import { useProfile } from "@/hooks/useProfile"; import { nip19 } from "nostr-tools"; import { useNavigate } from "react-router"; +import { KindBadge } from "@/components/KindBadge"; +import { WindowInstance } from "@/types/app"; + +/** + * Helper to extract all unique event kinds from a spellbook's windows + */ +function getSpellbookKinds(spellbook: ParsedSpellbook): number[] { + const kinds = new Set{spellbook.description}