From ac6bb01a42138143ba577464e0d2e3ec8427a081 Mon Sep 17 00:00:00 2001 From: tienifr Date: Wed, 3 Apr 2024 20:27:16 +0700 Subject: [PATCH] Add comment for not using useFocusEffect --- src/pages/workspace/WorkspaceMembersPage.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/pages/workspace/WorkspaceMembersPage.tsx b/src/pages/workspace/WorkspaceMembersPage.tsx index 3a876cb84a0d..9f210cb6d2ac 100644 --- a/src/pages/workspace/WorkspaceMembersPage.tsx +++ b/src/pages/workspace/WorkspaceMembersPage.tsx @@ -146,6 +146,7 @@ function WorkspaceMembersPage({ // eslint-disable-next-line react-hooks/exhaustive-deps }, [selectedEmployees, policy?.owner, session?.accountID]); + // useFocusEffect would make getWorkspaceMembers get called twice on fresh login because policyMember is a dependency of getWorkspaceMembers. useEffect(() => { if (!isFocused) { return;