import React from 'react'; import { Image, ImageProps } from 'react-native'; import { PIECES } from '../../constants'; import { useChessboardProps } from '../../context/props-context/hooks'; import type { PieceType } from '../../types'; type ChessPieceType = { id: PieceType; } & Partial; const ChessPiece: React.FC = React.memo(({ id, ...rest }) => { const { pieceSize, renderPiece } = useChessboardProps(); return ( renderPiece?.(id) ?? ( ) ); }); export { ChessPiece };