Files
Folo/apps/desktop/layer/renderer/src/modules/timeline-column/hook.ts
T
2025-04-28 21:42:23 +08:00

11 lines
327 B
TypeScript

import { useDndContext } from "@dnd-kit/core"
import { useFeedAreaScrollProgressValue } from "./atom"
export function useShouldFreeUpSpace() {
const dndContext = useDndContext()
const isDragging = !!dndContext.active
const scrollProgress = useFeedAreaScrollProgressValue()
return isDragging && scrollProgress === 0
}