diff --git a/src/components/InfoPanel.tsx b/src/components/InfoPanel.tsx
index 88187ad..f91c9b3 100644
--- a/src/components/InfoPanel.tsx
+++ b/src/components/InfoPanel.tsx
@@ -41,9 +41,11 @@ function getInfoPanelTextByGameState(params: {
}
return context.texts.GameEnded + " " + whoWon;
} else {
- return game?.checkIsPlayerTurn(userKey)
- ? context.texts.YourTurn
- : context.texts.OpponentTurn;
+ if (game) {
+ return game.checkIsPlayerTurn(userKey)
+ ? context.texts.YourTurn
+ : context.texts.OpponentTurn;
+ }
}
return undefined;
}
@@ -81,29 +83,34 @@ const InfoPanel: FunctionComponent<{
userKeyWhoLeave,
searchingOpponent,
}) => {
- const isUserTurn = game?.checkIsPlayerTurn(userKey);
- const containerColor = isUserTurn
- ? context.themeManager.theme.playerTurnColor
- : context.themeManager.theme.holeColor;
- const textColor = getColorByLuminance(
- containerColor,
- context.themeManager.theme.primary,
- context.themeManager.theme.primaryLight
- );
- return (
-
- {getInfoPanelTextByGameState({
- context,
- game,
- crashMessage,
- userKey,
- userKeyWhoLeave,
- searchingOpponent,
- })}
-
-
+ {text}
+
+