Skip to content

Commit 2c20c42

Browse files
committed
Small cleanup
1 parent 9797952 commit 2c20c42

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/pages/GamePage.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -264,6 +264,7 @@ function GamePage({ match }) {
264264

265265
const hint = game.enableHint && answer ? answer.slice(0, numHints) : null;
266266
const gameEnded = !answer || game.status === "done";
267+
const shouldFocus = focusMode === "on" && !spectating && !gameEnded;
267268
if (
268269
!answer &&
269270
!spectating &&
@@ -412,7 +413,7 @@ function GamePage({ match }) {
412413
<Grid container spacing={2}>
413414
<Box clone order={{ xs: 3, sm: 1 }}>
414415
<Grid item xs={12} sm={4} md={3} className={classes.sideColumn}>
415-
{(focusMode !== "on" || spectating || gameEnded) && (
416+
{shouldFocus || (
416417
<Paper style={{ display: "flex", height: "100%", padding: 8 }}>
417418
<Chat
418419
title="Game Chat"
@@ -493,7 +494,7 @@ function GamePage({ match }) {
493494
</Box>
494495
<Box clone order={{ xs: 2, sm: 3 }}>
495496
<Grid item xs={12} md={3} className={classes.sideColumn}>
496-
{(focusMode !== "on" || spectating || gameEnded) && (
497+
{shouldFocus || (
497498
<Box order={{ xs: 2, md: 1 }} style={{ maxHeight: "100%" }}>
498499
<GameSidebar
499500
game={game}

0 commit comments

Comments
 (0)