Skip to content

Commit

Permalink
removed console log && added variable test.
Browse files Browse the repository at this point in the history
  • Loading branch information
Julien MAIRE authored and Julien MAIRE committed Feb 3, 2025
1 parent 8163419 commit 617ba2d
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/games/GameShow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ const MatchupField = () => {

const GameStatusField = () => {
const gameStatus = useFieldValue({ source: "_game_status" });
if (!gameStatus) {
return "Loading game status field ...";
}
return (
<Typography sx={{ textAlign: "center" }}>
The match status is: <b>{gameStatus}</b>.
Expand All @@ -26,9 +29,8 @@ const GameStatusField = () => {
const GameBoardView = () => {
const victoryState = useFieldValue({ source: "_victory_state" });
const boardState = useFieldValue({ source: "board_state" });
console.log(victoryState, boardState);
if (!victoryState || !boardState) {
return "";
return "Loading game board view ...";
}
return <GameGrid victoryState={victoryState} boardState={boardState} />;
};
Expand Down

0 comments on commit 617ba2d

Please sign in to comment.