Stabilize sidebar workspace press handler

This commit is contained in:
Mohamed Boudra
2026-04-22 14:14:34 +07:00
parent f422dabf1e
commit 3c5bfd6e3d

View File

@@ -379,6 +379,10 @@ function MobileSidebar({
windowWidth,
]);
const handleWorkspacePress = useCallback(() => {
closeToAgent();
}, [closeToAgent]);
const closeGesture = useMemo(
() =>
Gesture.Pan()
@@ -513,7 +517,7 @@ function MobileSidebar({
projects={projects}
isRefreshing={isManualRefresh && isRevalidating}
onRefresh={handleRefresh}
onWorkspacePress={() => closeToAgent()}
onWorkspacePress={handleWorkspacePress}
onAddProject={handleOpenProject}
parentGestureRef={closeGestureRef}
/>