Skip to content

Commit

Permalink
trigger fid update on Votes page
Browse files Browse the repository at this point in the history
  • Loading branch information
artlu99 committed Jun 25, 2024
1 parent 1542ca4 commit 325f771
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/pages/VotesPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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]);
Expand Down

0 comments on commit 325f771

Please sign in to comment.