multiple zapping issues resolved for confirming and showing active states of zaps #36

Merged
freakoverse merged 6 commits from staging into master 2024-09-11 18:02:41 +00:00
Showing only changes of commit d15c5a21d9 - Show all commits

View File

@ -13,7 +13,7 @@ import {
Filter as NostrEventFilter,
UnsignedEvent
} from 'nostr-tools'
import React, { useMemo } from 'react'
import React, { useEffect, useMemo } from 'react'
import { Dispatch, SetStateAction, useState } from 'react'
import { useNavigate } from 'react-router-dom'
import { toast } from 'react-toastify'
@ -58,6 +58,10 @@ export const Comments = ({ modDetails, setCommentCount }: Props) => {
author: AuthorFilterEnum.All_Comments
})
useEffect(() => {
setCommentCount(commentEvents.length)
}, [commentEvents, setCommentCount])
const userState = useAppSelector((state) => state.user)
useDidMount(async () => {
@ -202,8 +206,6 @@ export const Comments = ({ modDetails, setCommentCount }: Props) => {
return true
}
setCommentCount(commentEvents.length)
const comments = useMemo(() => {
let filteredComments = commentEvents
if (filterOptions.author === AuthorFilterEnum.Creator_Comments) {