Add missing repost tag to latest mods on home page #195

Merged
enes merged 2 commits from issues/190-missing-repost-tags into staging 2025-01-15 19:22:07 +00:00
2 changed files with 20 additions and 0 deletions
Showing only changes of commit e0394ab0fd - Show all commits

View File

@ -4,6 +4,7 @@ export * from './useFilteredMods'
export * from './useGames'
export * from './useMuteLists'
export * from './useNSFWList'
export * from './useRepostList'
export * from './useReactions'
export * from './useNDKContext'
export * from './useScrollDisable'

View File

@ -0,0 +1,19 @@
import { useState } from 'react'
import { useDidMount } from './useDidMount'
import { useNDKContext } from './useNDKContext'
import { CurationSetIdentifiers, getReportingSet } from 'utils'
export const useRepostList = () => {
const ndkContext = useNDKContext()
const [repostList, setRepostList] = useState<string[]>([])
useDidMount(async () => {
const list = await getReportingSet(
CurationSetIdentifiers.Repost,
ndkContext
)
setRepostList(list)
})
return repostList
}