({ id }: { id: number })
| 118 | |
| 119 | // Create a separate component for the drag handle |
| 120 | function DragHandle({ id }: { id: number }) { |
| 121 | const { attributes, listeners } = useSortable({ |
| 122 | id, |
| 123 | }) |
| 124 | |
| 125 | return ( |
| 126 | <Button |
| 127 | {...attributes} |
| 128 | {...listeners} |
| 129 | variant="ghost" |
| 130 | size="icon" |
| 131 | className="text-muted-foreground size-7 hover:bg-transparent" |
| 132 | > |
| 133 | <IconGripVertical className="text-muted-foreground size-3" /> |
| 134 | <span className="sr-only">Drag to reorder</span> |
| 135 | </Button> |
| 136 | ) |
| 137 | } |
| 138 | |
| 139 | const columns: ColumnDef<z.infer<typeof schema>>[] = [ |
| 140 | { |
nothing calls this directly
no outgoing calls
no test coverage detected