fix : show game result
This commit is contained in:
@@ -11,6 +11,13 @@ export default function GamePanel() {
|
|||||||
|
|
||||||
if (!hasGameInfo) return null;
|
if (!hasGameInfo) return null;
|
||||||
|
|
||||||
|
const termination =
|
||||||
|
gameFromUrl?.termination || game.header().Termination || "?";
|
||||||
|
const result =
|
||||||
|
termination.split(" ").length > 2
|
||||||
|
? termination
|
||||||
|
: gameFromUrl?.result || game.header().Result || "?";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<Grid
|
<Grid
|
||||||
item
|
item
|
||||||
@@ -35,8 +42,7 @@ export default function GamePanel() {
|
|||||||
|
|
||||||
<Grid item container xs justifyContent="center" alignItems="center">
|
<Grid item container xs justifyContent="center" alignItems="center">
|
||||||
<Typography noWrap fontSize="0.9rem">
|
<Typography noWrap fontSize="0.9rem">
|
||||||
Result :{" "}
|
Result : {result}
|
||||||
{gameFromUrl?.termination || game.header().Termination || "?"}
|
|
||||||
</Typography>
|
</Typography>
|
||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|||||||
Reference in New Issue
Block a user