Skip to content

Commit

Permalink
fix space for last item
Browse files Browse the repository at this point in the history
vieiralucas committed Dec 4, 2024
1 parent b0e3379 commit 566a0f2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions apps/web/src/components/DocumentsTree.tsx
Original file line number Diff line number Diff line change
@@ -16,7 +16,6 @@ import ReactDOM from 'react-dom'
import {
CSSProperties,
MouseEventHandler,
ReactNode,
useCallback,
useEffect,
useMemo,
@@ -66,7 +65,6 @@ const layerStyles: CSSProperties = {
const DocDragLayer = () => {
const {
item,
itemType,
isDragging,
initialCursorOffset,
initialFileOffset,
@@ -321,7 +319,7 @@ function NodeComponent(props: NodeComponentProps) {

const containerRef = useRef<HTMLDivElement>(null)
const linkRef = useRef<HTMLAnchorElement>(null)
const [{ isDragging }, drag, dragPreview] = useDrag({
const [, drag, dragPreview] = useDrag({
type: 'document',
item: props.document,
collect: (monitor) => ({
@@ -565,7 +563,7 @@ function NodeComponent(props: NodeComponentProps) {
)}
</div>
</div>
{props.isLast && <div className="h-10" />}
{props.isLast && props.level === 0 && <div className="h-10" />}
</li>
)
}

0 comments on commit 566a0f2

Please sign in to comment.