diff --git a/src/components/InfoPanel.tsx b/src/components/InfoPanel.tsx index 856023b..1bb966b 100644 --- a/src/components/InfoPanel.tsx +++ b/src/components/InfoPanel.tsx @@ -3,6 +3,7 @@ import * as React from "react"; import { FunctionComponent } from "react"; import { Context } from "../context/context"; import { getColorByBrightness } from "../util/ColorUtil"; +import CircularPanel from "./CircularPanel"; function getInfoPanelTextByGameState(params: { context: Context; @@ -10,7 +11,6 @@ function getInfoPanelTextByGameState(params: { crashMessage?: string; userKey?: string; userKeyWhoLeave?: string; - searchingOpponent: boolean; }): string | undefined { const { context, @@ -18,11 +18,8 @@ function getInfoPanelTextByGameState(params: { crashMessage, userKey, userKeyWhoLeave, - searchingOpponent, } = params; - if (searchingOpponent) { - return context.texts.SearchingOpponent + " " + context.texts.PleaseWait; - } else if (crashMessage) { + if (crashMessage) { return context.texts.GameCrashed + " " + crashMessage; } else if (userKeyWhoLeave) { let message = context.texts.OpponentLeavesTheGame; @@ -50,44 +47,24 @@ function getInfoPanelTextByGameState(params: { return undefined; } -const InfoPanelContainer: FunctionComponent<{ - context: Context; - color: string; -}> = (props) => { - return ( -