Skip to content

Commit

Permalink
Fixed GameTimings not showing up
Browse files Browse the repository at this point in the history
  • Loading branch information
anoek committed Dec 16, 2023
1 parent 80dbddb commit 1e96ad8
Showing 1 changed file with 11 additions and 18 deletions.
29 changes: 11 additions & 18 deletions src/views/Game/Game.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -900,29 +900,22 @@ export function Game(): JSX.Element | null {
};

const frag_timings = () => {
if (
goban.current?.engine &&
goban.current.engine.config &&
goban.current.engine.config.moves &&
goban.current.engine.config.start_time &&
goban.current.engine.config.end_time &&
goban.current.engine.config.free_handicap_placement &&
goban.current.engine.config.handicap &&
goban.current.engine.config.black_player_id &&
goban.current.engine.config.white_player_id
) {
if (goban.current?.engine?.config) {
return (
<GameTimings
moves={goban.current.engine.config.moves}
start_time={goban.current.engine.config.start_time}
end_time={goban.current.engine.config.end_time}
free_handicap_placement={goban.current.engine.config.free_handicap_placement}
handicap={goban.current.engine.config.handicap}
black_id={goban.current.engine.config.black_player_id}
white_id={goban.current.engine.config.white_player_id}
moves={goban.current.engine.config.moves ?? []}
start_time={goban.current.engine.config.start_time ?? 0}
end_time={goban.current.engine.config.end_time ?? 0}
free_handicap_placement={
goban.current.engine.config.free_handicap_placement ?? false
}
handicap={goban.current.engine.config.handicap ?? 0}
black_id={goban.current.engine.config.black_player_id ?? 0}
white_id={goban.current.engine.config.white_player_id ?? 0}
/>
);
}

return null;
};

Expand Down

0 comments on commit 1e96ad8

Please sign in to comment.