Reduce workspace rerenders during explorer resize
This commit is contained in:
@@ -122,7 +122,7 @@ import { findAdjacentPane } from "@/utils/split-navigation";
|
||||
import { isAbsolutePath } from "@/utils/path";
|
||||
import { useIsCompactFormFactor, supportsDesktopPaneSplits } from "@/constants/layout";
|
||||
import { isWeb, isNative } from "@/constants/platform";
|
||||
import { useContainerWidth } from "@/hooks/use-container-width";
|
||||
import { useContainerWidthBelow } from "@/hooks/use-container-width";
|
||||
|
||||
const TERMINALS_QUERY_STALE_TIME = 5_000;
|
||||
const WORKSPACE_SETUP_AUTO_OPEN_WINDOW_MS = 30_000;
|
||||
@@ -1051,8 +1051,8 @@ function WorkspaceScreenContent({
|
||||
);
|
||||
const pendingByDraftId = useCreateFlowStore((state) => state.pendingByDraftId);
|
||||
const { closingTabIds, closeTab } = useCloseTabs();
|
||||
const { onLayout: onHeaderLayout, width: headerWidth } = useContainerWidth();
|
||||
const showCompactButtonLabels = headerWidth < 700;
|
||||
const { onLayout: onHeaderLayout, isBelow: showCompactButtonLabels } =
|
||||
useContainerWidthBelow(700);
|
||||
const closeWorkspaceTabWithCleanup = useCallback(
|
||||
function closeWorkspaceTabWithCleanup(input: {
|
||||
tabId: string;
|
||||
|
||||
Reference in New Issue
Block a user