fix(popup): depth calculation for kind 1
This commit is contained in:
parent
6dc1556b4c
commit
fbd9b7e527
@ -40,6 +40,7 @@ import {
|
||||
} from '@nostr-dev-kit/ndk'
|
||||
import { NoteQuoteRepostPopup } from 'components/Notes/NoteQuoteRepostPopup'
|
||||
import { NoteRepostPopup } from 'components/Notes/NoteRepostPopup'
|
||||
import _ from 'lodash'
|
||||
|
||||
interface CommentsPopupProps {
|
||||
title: string
|
||||
@ -63,12 +64,14 @@ export const CommentsPopup = ({ title }: CommentsPopupProps) => {
|
||||
? `${appRoutes.feed}/`
|
||||
: undefined
|
||||
const { event } = useLoaderData() as CommentsLoaderResult
|
||||
const eTags = event.getMatchingTags('e')
|
||||
const lastETag = _.last(eTags)
|
||||
const {
|
||||
size,
|
||||
parent: replyEvent,
|
||||
isComplete,
|
||||
root: rootEvent
|
||||
} = useReplies(event.tagValue('e'))
|
||||
} = useReplies(lastETag?.[1])
|
||||
const isRoot = event.tagValue('a') === event.tagValue('A')
|
||||
const [profile, setProfile] = useState<UserProfile>()
|
||||
const { commentEvents, setCommentEvents } = useComments(
|
||||
|
Loading…
x
Reference in New Issue
Block a user