Pass enabled: isBranchMenuOpen to gitBranchSearchInfiniteQueryOptions so the infinite query (with its 60s refetchInterval) is only active while the branch picker is open. The useEffect prefetch already ensures data is available for the initial open.
Pass enabled: isBranchMenuOpen to gitBranchSearchInfiniteQueryOptions so the infinite query (with its 60s refetchInterval) is only active while the branch picker is open. The useEffect prefetch already ensures data is available for the initial open.