From 04b0f4548c0c1bd88c3a9233a19de0d9338c9edc Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Thu, 29 Dec 2022 22:59:53 -0800 Subject: [PATCH] Remove duplicate API call + explicitly set loading state --- .../followers/FollowerCollection/FollowerCollection.tsx | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/web/components/ui/followers/FollowerCollection/FollowerCollection.tsx b/web/components/ui/followers/FollowerCollection/FollowerCollection.tsx index 2945a1fb8..d2bd9ccee 100644 --- a/web/components/ui/followers/FollowerCollection/FollowerCollection.tsx +++ b/web/components/ui/followers/FollowerCollection/FollowerCollection.tsx @@ -29,23 +29,16 @@ export const FollowerCollection: FC = ({ name, onFollow setFollowers(results); setTotal(totalResults); + setLoading(false); } catch (error) { console.error(error); } }; - useEffect(() => { - getFollowers(); - }, []); - useEffect(() => { getFollowers(); }, [page]); - useEffect(() => { - setLoading(false); - }, [followers]); - const noFollowers = (

Be the first follower!