diff --git a/src/pages/VotesPage.tsx b/src/pages/VotesPage.tsx index 3912aad..623288c 100644 --- a/src/pages/VotesPage.tsx +++ b/src/pages/VotesPage.tsx @@ -20,9 +20,10 @@ const VotesPage: React.FC = () => { const ffQuery = useQuery(followingByFidQuery(fid)); const memodFollowing = useMemo(() => { + if (!fid) return; if (ffQuery.isLoading || ffQuery.error) return null; return (ffQuery.data?.result?.users ?? []).map((l) => Number(l.fid)); - }, [ffQuery.isLoading, ffQuery.error, ffQuery.data]); + }, [fid, ffQuery]); const gvQuery = useQuery(getVotesQuery()); const memodVotes = useMemo(() => (gvQuery.data?.results ?? []).filter((v) => v.votedFid !== fid), [fid, gvQuery]);