add ability to move cards
images / check (push) Successful in 30s
images / image (push) Successful in 21s

This commit is contained in:
2026-11-19 18:07:50 +01:00
parent dacd374946
commit 5001cae163
19 changed files with 1197 additions and 57 deletions
+4 -1
View File
@@ -1,4 +1,5 @@
import { useEffect, useRef, useState } from "react"
import { useDndContext } from "@dnd-kit/core"
import { useSortable } from "@dnd-kit/sortable"
import { CSS } from "@dnd-kit/utilities"
import { Pencil } from "lucide-react"
@@ -85,6 +86,8 @@ export function LinkTile({
link: HomeLink
onEdit: () => void
}) {
// while a card is dragged, the arrow keys go from card to card, not through the links
const cardDragged = !!useDndContext().active?.data.current?.card
const {
attributes,
listeners,
@@ -92,7 +95,7 @@ export function LinkTile({
transform,
transition,
isDragging,
} = useSortable({ id: link.id })
} = useSortable({ id: link.id, disabled: { droppable: cardDragged } })
return (
<div
ref={setNodeRef}