+ {piece.map((shape, i) => {
+ const onClick = () => {
+ setPiece((board) => {
+ const newBoard = [...board];
+ newBoard[i] = board[i].rotated();
+ return newBoard;
+ });
+ interactCallback?.();
+ };
+ const fixRotate = () => {
+ setPiece((board) => {
+ const newBoard = [...board];
+ newBoard[i] = board[i].fixedRotated();
+ return newBoard;
+ });
+ };
+
+ return (
+
+ );
+ })}
+