use shared IPosition interface for diagrams and current move state

This commit is contained in:
2026-06-02 20:17:48 +02:00
parent 87fa6997ee
commit 1d6a9f8e6e
4 changed files with 12 additions and 14 deletions
+2 -1
View File
@@ -1,9 +1,10 @@
import LichessPgnViewer from "lichess-pgn-viewer";
import { useEffect, useRef } from "react";
import type { IPosition } from "#/interfaces.ts";
interface IProps {
gamePgn: string;
handlePlyChange: ({ ply, fen }: { ply: number; fen: string }) => void;
handlePlyChange: ({ ply, fen }: IPosition) => void;
}
const PgnViewer = ({ gamePgn, handlePlyChange }: IProps) => {