"use client" import { Accordion } from "@/components/ui/accordion" import { COOKIE_VALUES } from "@/data/general" import { Player } from "@/lib/schema/player" import { closestCenter, DndContext, DragEndEvent, KeyboardSensor, PointerSensor, useSensor, useSensors } from "@dnd-kit/core" import { arrayMove, SortableContext, sortableKeyboardCoordinates, verticalListSortingStrategy } from "@dnd-kit/sortable" import { useSortable } from "@dnd-kit/sortable" import { CSS } from "@dnd-kit/utilities" import Cookies from "js-cookie" import { GripVertical } from "lucide-react" import { usePathname } from "next/navigation" import { useEffect, useRef, useState } from "react" import ArcadeStats from "./_stats/arcade/arcade" import BedwarsStats from "./_stats/bedwars/bedwars" import BlitzStats from "./_stats/blitz/blitz" import BuildBattleStats from "./_stats/build-battle/build-battle" import ClassicStats from "./_stats/classic/classic" import CopsAndCrimsStats from "./_stats/copsandcrims/copsandcrims" import DuelsStats from "./_stats/duels/duels" import MegaWallsStats from "./_stats/megawalls/megawalls" import MurderMysteryStats from "./_stats/murder-mystery/murder-mystery" import PitStats from "./_stats/pit/pit" import SkyWarsStats from "./_stats/skywars/skywars" import SmashHerosStats from "./_stats/smashheros/smashheros" import SpeedUHCStats from "./_stats/speeduhc/speeduhc" import TNTGamesStats from "./_stats/tnt-games/tnt-games" import UHCStats from "./_stats/uhc/uhc" import WarlordsStats from "./_stats/warlords/warlords" import WoolGamesStats from "./_stats/woolgames/woolgames" export function PlayerPageLoadText() { const path = usePathname() return
{`Loading stats for ${path.split("/").at(-1)}`}
} interface SortableStatItemProps { id: string children: React.ReactNode } function SortableStatItem({ id, children }: SortableStatItemProps) { const { attributes, listeners, setNodeRef, transform, transition, isDragging } = useSortable({ id }) const style = { transform: CSS.Transform.toString(transform), transition, opacity: isDragging ? 0.5 : 1 } return (