Skip to content

Commit c35c1bf

Browse files
committed
fix : default load game value
1 parent 4b841c7 commit c35c1bf

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/sections/loadGame/loadGameDialog.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ export default function NewGameDialog({ open, onClose, setGame }: Props) {
3535
const [pgn, setPgn] = useState("");
3636
const [gameOrigin, setGameOrigin] = useLocalStorage(
3737
"preferred-game-origin",
38-
GameOrigin.Pgn
38+
GameOrigin.ChessCom
3939
);
4040
const [parsingError, setParsingError] = useState("");
4141
const setBoardOrientation = useSetAtom(boardOrientationAtom);
@@ -109,9 +109,9 @@ export default function NewGameDialog({ open, onClose, setGame }: Props) {
109109
setParsingError("");
110110
}}
111111
>
112-
{Object.values(GameOrigin).map((origin) => (
112+
{Object.entries(gameOriginLabel).map(([origin, label]) => (
113113
<MenuItem key={origin} value={origin}>
114-
{gameOriginLabel[origin]}
114+
{label}
115115
</MenuItem>
116116
))}
117117
</Select>
@@ -160,7 +160,7 @@ export default function NewGameDialog({ open, onClose, setGame }: Props) {
160160
}
161161

162162
const gameOriginLabel: Record<GameOrigin, string> = {
163-
[GameOrigin.Pgn]: "PGN",
164163
[GameOrigin.ChessCom]: "Chess.com",
165164
[GameOrigin.Lichess]: "Lichess.org",
165+
[GameOrigin.Pgn]: "PGN",
166166
};

0 commit comments

Comments
 (0)