Add missing repost tag to latest mods on home page #195
@ -4,6 +4,7 @@ export * from './useFilteredMods'
|
|||||||
export * from './useGames'
|
export * from './useGames'
|
||||||
export * from './useMuteLists'
|
export * from './useMuteLists'
|
||||||
export * from './useNSFWList'
|
export * from './useNSFWList'
|
||||||
|
export * from './useRepostList'
|
||||||
export * from './useReactions'
|
export * from './useReactions'
|
||||||
export * from './useNDKContext'
|
export * from './useNDKContext'
|
||||||
export * from './useScrollDisable'
|
export * from './useScrollDisable'
|
||||||
|
19
src/hooks/useRepostList.tsx
Normal file
19
src/hooks/useRepostList.tsx
Normal 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
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user