diff --git a/src/views/ReportsCenter/ReportedGame.tsx b/src/views/ReportsCenter/ReportedGame.tsx index f593f2bdd4..903016758f 100644 --- a/src/views/ReportsCenter/ReportedGame.tsx +++ b/src/views/ReportsCenter/ReportedGame.tsx @@ -43,6 +43,8 @@ import { socket } from "sockets"; import { Player } from "Player"; import { useUser } from "hooks"; +const TRUNCATED_GAME_LOG_LENGTH = 25; + export function ReportedGame({ game_id, reported_at, @@ -309,7 +311,10 @@ function GameLog({ goban }: { goban: Goban }): JSX.Element { {log - .filter((_, idx) => shouldDisplayFullLog || idx < 25) + .filter( + (_, idx) => + shouldDisplayFullLog || idx < TRUNCATED_GAME_LOG_LENGTH, + ) .map((entry, idx) => ( @@ -328,7 +333,7 @@ function GameLog({ goban }: { goban: Goban }): JSX.Element { ))} - {!shouldDisplayFullLog && ( + {!shouldDisplayFullLog && log.length > TRUNCATED_GAME_LOG_LENGTH && (