feat: 💨
This commit is contained in:
parent
32ec3af729
commit
6df352a2ab
3 changed files with 7 additions and 4 deletions
|
|
@ -65,6 +65,9 @@ export default function Likes({ event }: { event: Event }) {
|
|||
)}
|
||||
onClick={(e) => {
|
||||
e.stopPropagation()
|
||||
if (pubkey && pubkeys.has(pubkey)) {
|
||||
return
|
||||
}
|
||||
like(key, emoji)
|
||||
}}
|
||||
>
|
||||
|
|
|
|||
|
|
@ -15,7 +15,7 @@ import { useScreenSize } from '@/providers/ScreenSizeProvider'
|
|||
import { useUserTrust } from '@/providers/UserTrustProvider'
|
||||
import noteStatsService from '@/services/note-stats.service'
|
||||
import { Loader, PencilLine, Repeat } from 'lucide-react'
|
||||
import { Event, kinds } from 'nostr-tools'
|
||||
import { Event } from 'nostr-tools'
|
||||
import { useMemo, useState } from 'react'
|
||||
import { useTranslation } from 'react-i18next'
|
||||
import PostEditor from '../PostEditor'
|
||||
|
|
@ -51,8 +51,8 @@ export default function RepostButton({ event }: { event: Event }) {
|
|||
const hasReposted = noteStats?.repostPubkeySet?.has(pubkey)
|
||||
if (hasReposted) return
|
||||
if (!noteStats?.updatedAt) {
|
||||
const events = await noteStatsService.fetchNoteStats(event, pubkey)
|
||||
if (events.some((e) => e.kind === kinds.Repost && e.pubkey === pubkey)) {
|
||||
const noteStats = await noteStatsService.fetchNoteStats(event, pubkey)
|
||||
if (noteStats.repostPubkeySet?.has(pubkey)) {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue