diff --git a/src/features/recent-projects/renderer/hooks/useRecentProjectsSection.ts b/src/features/recent-projects/renderer/hooks/useRecentProjectsSection.ts index 3eddb523..187851a1 100644 --- a/src/features/recent-projects/renderer/hooks/useRecentProjectsSection.ts +++ b/src/features/recent-projects/renderer/hooks/useRecentProjectsSection.ts @@ -110,6 +110,7 @@ export function useRecentProjectsSection( initialSnapshot?.payload.projects ?? [] ); const activeContextIdRef = useRef(activeContextId); + activeContextIdRef.current = activeContextId; const provisioningState = useMemo( () => ({ currentProvisioningRunIdByTeam, provisioningRuns }), [currentProvisioningRunIdByTeam, provisioningRuns] @@ -130,10 +131,6 @@ export function useRecentProjectsSection( recentProjectsRef.current = recentProjects; }, [recentProjects]); - useEffect(() => { - activeContextIdRef.current = activeContextId; - }, [activeContextId]); - const reload = useCallback( async (options?: { force?: boolean }): Promise => { const requestContextId = activeContextId;