import { useSortable } from "@dnd-kit/sortable"; import { CSS } from "@dnd-kit/utilities"; import { ClientOnly } from "@tanstack/react-router"; import { GripVertical } from "lucide-react"; import type { PropsWithChildren } from "react"; interface SortableBackupCardProps { isDragging?: boolean; uniqueId: string | number; } export function SortableCard({ isDragging, uniqueId, children }: PropsWithChildren) { const { attributes, listeners, setNodeRef, transform, transition } = useSortable({ id: uniqueId, }); const style = { transform: CSS.Transform.toString(transform), transition, opacity: isDragging ? 0.5 : 1, }; return (
{children}
); }