Skip to content

Commit

Permalink
Update SidebarLinksData.tsx
Browse files Browse the repository at this point in the history
  • Loading branch information
thienlnam committed Aug 7, 2024
1 parent 7975157 commit 28e3d0e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/pages/home/sidebar/SidebarLinksData.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,13 @@ function SidebarLinksData({insets, isLoadingApp = true, onLinkClick, priorityMod

const {orderedReportIDs, currentReportID, policyMemberAccountIDs} = useReportIDs();

// eslint-disable-next-line react-compiler/react-compiler, react-hooks/exhaustive-deps
useEffect(() => Policy.openWorkspace(activeWorkspaceID ?? '-1', policyMemberAccountIDs), [activeWorkspaceID]);
useEffect(() => {
if (!activeWorkspaceID || !policyMemberAccountIDs) {
return;
}

Policy.openWorkspace(activeWorkspaceID, policyMemberAccountIDs);
}, [activeWorkspaceID, policyMemberAccountIDs]);

const isLoading = isLoadingApp;
const currentReportIDRef = useRef(currentReportID);
Expand Down

0 comments on commit 28e3d0e

Please sign in to comment.