fix: replies

This commit is contained in:
codytseng 2025-05-15 23:38:22 +08:00
parent a6c2decfe3
commit 304bbe4f01
13 changed files with 178 additions and 120 deletions

View file

@ -1,6 +1,5 @@
import { useSecondaryPage } from '@/PageManager'
import { ExtendedKind } from '@/constants'
import { useFetchEvent } from '@/hooks'
import { extractImageInfosFromEventTags, getParentEventId, getUsingClient } from '@/lib/event'
import { toNote } from '@/lib/link'
import { Event } from 'nostr-tools'
@ -30,7 +29,6 @@ export default function Note({
[event, hideParentNotePreview]
)
const imageInfos = useMemo(() => extractImageInfosFromEventTags(event), [event])
const { event: parentEvent, isFetching } = useFetchEvent(parentEventId)
const usingClient = useMemo(() => getUsingClient(event), [event])
return (
@ -60,8 +58,7 @@ export default function Note({
</div>
{parentEventId && (
<ParentNotePreview
event={parentEvent}
isFetching={isFetching}
eventId={parentEventId}
className="mt-2"
onClick={(e) => {
e.stopPropagation()