fix(recent-projects): close context switch response race
This commit is contained in:
parent
b46b53d667
commit
96478a604f
1 changed files with 1 additions and 4 deletions
|
|
@ -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<void> => {
|
||||
const requestContextId = activeContextId;
|
||||
|
|
|
|||
Loading…
Reference in a new issue