use uri instead of rkey to get feed data
parent
59c1b545fa
commit
99d66679b3
|
@ -23,17 +23,20 @@ export const CustomFeed = withAuthRequired(
|
||||||
observer(({route}: Props) => {
|
observer(({route}: Props) => {
|
||||||
const rootStore = useStores()
|
const rootStore = useStores()
|
||||||
const {rkey, name, displayName} = route.params
|
const {rkey, name, displayName} = route.params
|
||||||
const currentFeed = useCustomFeed(rkey)
|
const uri = useMemo(
|
||||||
|
() => makeRecordUri(name, 'app.bsky.feed.generator', rkey),
|
||||||
|
[rkey, name],
|
||||||
|
)
|
||||||
|
const currentFeed = useCustomFeed(uri)
|
||||||
const pal = usePalette('default')
|
const pal = usePalette('default')
|
||||||
const scrollElRef = useRef<FlatList>(null)
|
const scrollElRef = useRef<FlatList>(null)
|
||||||
const algoFeed: PostsFeedModel = useMemo(() => {
|
const algoFeed: PostsFeedModel = useMemo(() => {
|
||||||
const uri = makeRecordUri(name, 'app.bsky.feed.generator', rkey)
|
|
||||||
const feed = new PostsFeedModel(rootStore, 'custom', {
|
const feed = new PostsFeedModel(rootStore, 'custom', {
|
||||||
feed: uri,
|
feed: uri,
|
||||||
})
|
})
|
||||||
feed.setup()
|
feed.setup()
|
||||||
return feed
|
return feed
|
||||||
}, [rkey, rootStore, name])
|
}, [rootStore, uri])
|
||||||
|
|
||||||
console.log(currentFeed?.data.creator)
|
console.log(currentFeed?.data.creator)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue