Tierlist Fix
This commit is contained in:
@@ -278,11 +278,18 @@ export function TierList({
|
||||
|
||||
newPlacements[sourceCell] = arrayMove(items, oldIndex, newIndex);
|
||||
} else {
|
||||
// Move to different cell
|
||||
// Move to different cell - INSERT AT HOVERED POSITION
|
||||
const targetItems = [...placements[targetCell]];
|
||||
const insertIndex = targetItems.indexOf(targetId);
|
||||
|
||||
newPlacements = {
|
||||
...newPlacements,
|
||||
[sourceCell]: placements[sourceCell].filter((id) => id !== charId),
|
||||
[targetCell]: [...placements[targetCell], charId],
|
||||
[targetCell]: [
|
||||
...targetItems.slice(0, insertIndex),
|
||||
charId,
|
||||
...targetItems.slice(insertIndex),
|
||||
],
|
||||
};
|
||||
}
|
||||
} else {
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ import { AmberElementMap } from "@/lib/const";
|
||||
import { db } from "@/lib/db";
|
||||
import { cdn, characters, versions } from "@/lib/db/schema";
|
||||
|
||||
const exclude = ["Traveler"];
|
||||
const exclude = ["Traveler", "Manekin", "Manekina"];
|
||||
const extra: Avatar[] = [
|
||||
{
|
||||
id: "10000005-pyro",
|
||||
|
||||
Reference in New Issue
Block a user