diff --git a/src/App/Game.tsx b/src/App/Game.tsx
index 89e31f5..fea7285 100644
--- a/src/App/Game.tsx
+++ b/src/App/Game.tsx
@@ -56,7 +56,7 @@ export function Game() {
New Game
-
+
>
}
@@ -187,10 +187,10 @@ function WinnerText({ me, result }: { me: PlayResult, result: PlayResult }) {
}
-function GameHistory() {
+function GameHistory({ plays }: { plays?: Play[] }) {
const session = useSession();
- if (!session.currentGame || session.currentGame.plays.length === 0) {
+ if ((!session.currentGame || session.currentGame.plays.length === 0) && plays === undefined) {
return <>>
}
@@ -199,7 +199,7 @@ function GameHistory() {
Game History
- {session.currentGame.plays.map((play, i) =>
+ {(plays ?? session.currentGame!.plays).map((play, i) =>
User played {play.user}, and CPU played {play.cpu}! Winner:{" "}