From 99d66679b3fdba70d58142584e49b08537d9297b Mon Sep 17 00:00:00 2001 From: Ansh Nanda Date: Tue, 16 May 2023 19:09:19 -0700 Subject: [PATCH] use uri instead of rkey to get feed data --- src/view/screens/CustomFeed.tsx | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/view/screens/CustomFeed.tsx b/src/view/screens/CustomFeed.tsx index 016f3400..5644c16e 100644 --- a/src/view/screens/CustomFeed.tsx +++ b/src/view/screens/CustomFeed.tsx @@ -23,17 +23,20 @@ export const CustomFeed = withAuthRequired( observer(({route}: Props) => { const rootStore = useStores() 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 scrollElRef = useRef(null) const algoFeed: PostsFeedModel = useMemo(() => { - const uri = makeRecordUri(name, 'app.bsky.feed.generator', rkey) const feed = new PostsFeedModel(rootStore, 'custom', { feed: uri, }) feed.setup() return feed - }, [rkey, rootStore, name]) + }, [rootStore, uri]) console.log(currentFeed?.data.creator)