fix: 🐛

This commit is contained in:
codytseng 2024-12-18 15:19:20 +08:00
parent 4a39941352
commit 5966e06029

View file

@ -139,8 +139,10 @@ export default function ReplyNoteList({ event, className }: { event: NEvent; cla
}
const onNewReply = (evt: NEvent) => {
if (replies.some((reply) => reply.id === evt.id)) return
setReplies((pre) => [...pre, evt])
setReplies((pre) => {
if (pre.some((reply) => reply.id === evt.id)) return pre
return [...pre, evt]
})
if (evt.pubkey === pubkey) {
setTimeout(() => {
highlightReply(evt.id)