"use client"; import Image from "next/image"; import { motion } from "motion/react"; import type { ChessPiece } from "~/utils/chess-helpers"; import { cn } from "~/lib/utils"; import { getPieceImagePath } from "~/utils/chess-helpers"; interface PieceProps { piece: ChessPiece; dragging?: boolean; animate?: boolean; size?: number; } /** * Chess piece component with animation support */ const Piece: React.FC = ({ piece, dragging = false, animate = true, size = 60, }) => { const imagePath = getPieceImagePath(piece); if (!animate) { return (
{`${piece.color
); } return ( {`${piece.color ); }; export { Piece };