diff --git a/components/admin/stygian-editor.tsx b/components/admin/stygian-editor.tsx
index 3267a08..ecea9e6 100644
--- a/components/admin/stygian-editor.tsx
+++ b/components/admin/stygian-editor.tsx
@@ -25,6 +25,7 @@ import {
SortableContext,
sortableKeyboardCoordinates,
useSortable,
+ verticalListSortingStrategy,
} from "@dnd-kit/sortable";
import { CSS } from "@dnd-kit/utilities";
import { toast } from "sonner";
@@ -742,6 +743,52 @@ function VisualRecommendationGrid({
);
}
+function SortableTeam({
+ id,
+ position,
+ children,
+}: {
+ id: string;
+ position: number;
+ children: ReactNode;
+}) {
+ const {
+ attributes,
+ listeners,
+ setNodeRef,
+ transform,
+ transition,
+ isDragging,
+ } = useSortable({ id });
+ return (
+
+
+
+
+ Team {position + 1}
+
+
+ {children}
+
+
+
+ );
+}
+
function BossRecommendationEditor({
scheduleId,
version,
@@ -776,6 +823,13 @@ function BossRecommendationEditor({
.filter((group) => group.kind === "unit")
.flatMap((group) => group.items.flatMap((item) => toInput(item) ?? [])),
);
+ const teamSensors = useSensors(
+ useSensor(PointerSensor, { activationConstraint: { distance: 4 } }),
+ useSensor(KeyboardSensor, {
+ coordinateGetter: sortableKeyboardCoordinates,
+ }),
+ );
+ const teamIds = teams.map((_, index) => `team-${index}`);
const fingerprint = JSON.stringify({ teams, units });
const valid = teams.every(
(team) =>
@@ -868,9 +922,28 @@ function BossRecommendationEditor({