From c35c1bf0a3339a977af329c60e16dba5ca67be09 Mon Sep 17 00:00:00 2001 From: GuillaumeSD Date: Thu, 15 May 2025 16:43:57 +0200 Subject: [PATCH] fix : default load game value --- src/sections/loadGame/loadGameDialog.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/sections/loadGame/loadGameDialog.tsx b/src/sections/loadGame/loadGameDialog.tsx index e64ff42..eaec68f 100644 --- a/src/sections/loadGame/loadGameDialog.tsx +++ b/src/sections/loadGame/loadGameDialog.tsx @@ -35,7 +35,7 @@ export default function NewGameDialog({ open, onClose, setGame }: Props) { const [pgn, setPgn] = useState(""); const [gameOrigin, setGameOrigin] = useLocalStorage( "preferred-game-origin", - GameOrigin.Pgn + GameOrigin.ChessCom ); const [parsingError, setParsingError] = useState(""); const setBoardOrientation = useSetAtom(boardOrientationAtom); @@ -109,9 +109,9 @@ export default function NewGameDialog({ open, onClose, setGame }: Props) { setParsingError(""); }} > - {Object.values(GameOrigin).map((origin) => ( + {Object.entries(gameOriginLabel).map(([origin, label]) => ( - {gameOriginLabel[origin]} + {label} ))} @@ -160,7 +160,7 @@ export default function NewGameDialog({ open, onClose, setGame }: Props) { } const gameOriginLabel: Record = { - [GameOrigin.Pgn]: "PGN", [GameOrigin.ChessCom]: "Chess.com", [GameOrigin.Lichess]: "Lichess.org", + [GameOrigin.Pgn]: "PGN", };