Skip to content

Commit 5d6cd47

Browse files
feat: add back moves list container to mobile play page
1 parent 2f25086 commit 5d6cd47

File tree

2 files changed

+19
-8
lines changed

2 files changed

+19
-8
lines changed

src/components/Board/GameplayInterface.tsx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -271,14 +271,25 @@ export const GameplayInterface: React.FC<React.PropsWithChildren<Props>> = (
271271
<div className="flex-none">
272272
<BoardController />
273273
</div>
274+
<div className="w-full overflow-x-auto">
275+
<div className="flex flex-row whitespace-nowrap py-2">
276+
<MovesContainer
277+
game={game}
278+
termination={game.termination}
279+
mobile={true}
280+
/>
281+
</div>
282+
</div>
274283
<div className="w-screen">{props.children}</div>
275284
<StatsDisplay stats={stats} hideSession={true} />
276-
<ExportGame
277-
game={game}
278-
whitePlayer={whitePlayer ?? 'Unknown'}
279-
blackPlayer={blackPlayer ?? 'Unknown'}
280-
event={`Play vs. ${maiaTitle}`}
281-
/>
285+
<div className="px-2">
286+
<ExportGame
287+
game={game}
288+
whitePlayer={whitePlayer ?? 'Unknown'}
289+
blackPlayer={blackPlayer ?? 'Unknown'}
290+
event={`Play vs. ${maiaTitle}`}
291+
/>
292+
</div>
282293
</div>
283294
</div>
284295
</div>

src/components/Board/MovesContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const MovesContainer: React.FC<Props> = ({
6060
)
6161

6262
const container = (
63-
<div className="red-scrollbar flex h-64 flex-col overflow-y-auto overflow-x-hidden whitespace-nowrap rounded-sm bg-background-1/60 md:h-full md:w-full">
63+
<div className="flex flex-row overflow-x-auto overflow-y-auto whitespace-nowrap rounded-sm bg-background-1/60 md:h-full md:w-full md:flex-col md:overflow-x-hidden">
6464
<Tooltip id="check" />
6565
{moves.map(([white, black], index) => {
6666
const prevMoveIndex = index * 2
@@ -91,7 +91,7 @@ export const MovesContainer: React.FC<Props> = ({
9191

9292
return (
9393
<div key={index} className="flex w-full flex-row">
94-
<span className="flex w-1/6 items-center justify-center bg-background-2 py-1 text-sm text-secondary">
94+
<span className="flex items-center justify-center bg-background-2 px-2 py-1 text-sm text-secondary md:w-1/6 md:px-0">
9595
{index + 1}
9696
</span>
9797
<div

0 commit comments

Comments
 (0)