From 76e7a2f347b5a9068b99f4f4dbd894a88fc37e3d Mon Sep 17 00:00:00 2001 From: Claude Date: Wed, 21 Jan 2026 08:15:48 +0000 Subject: [PATCH] fix(editor): use feed renderer and skeleton for event previews When pasting event URLs in the editor, use KindRenderer (feed) and EventCardSkeleton instead of DetailKindRenderer and EventDetailSkeleton. Event previews in the editor are inline/compact like feed items, so they should use the feed renderer rather than the detail view renderer. --- .../editor/node-views/NostrEventPreviewRich.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/components/editor/node-views/NostrEventPreviewRich.tsx b/src/components/editor/node-views/NostrEventPreviewRich.tsx index 27bac69..136ae3e 100644 --- a/src/components/editor/node-views/NostrEventPreviewRich.tsx +++ b/src/components/editor/node-views/NostrEventPreviewRich.tsx @@ -1,13 +1,13 @@ import { NodeViewWrapper, type ReactNodeViewProps } from "@tiptap/react"; import { useNostrEvent } from "@/hooks/useNostrEvent"; -import { DetailKindRenderer } from "@/components/nostr/kinds"; +import { KindRenderer } from "@/components/nostr/kinds"; import type { EventPointer, AddressPointer } from "nostr-tools/nip19"; -import { EventDetailSkeleton } from "@/components/ui/skeleton"; +import { EventCardSkeleton } from "@/components/ui/skeleton"; /** * Rich preview component for Nostr events in the editor * - * Uses the full DetailKindRenderer to show event content + * Uses the feed KindRenderer to show event content inline */ export function NostrEventPreviewRich({ node }: ReactNodeViewProps) { const { type, data } = node.attrs as { @@ -43,9 +43,9 @@ export function NostrEventPreviewRich({ node }: ReactNodeViewProps) {
{!event ? ( - + ) : ( - + )}