Skip to content

Commit

Permalink
fix: error message format
Browse files Browse the repository at this point in the history
  • Loading branch information
SidonieBouthors committed Sep 4, 2024
1 parent bfda861 commit 651f5ef
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/src/pages/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,10 @@ export default function Home({ username }: { username: string }) {
msg: turnStatus.move
? turnStatus.move.length == 1
? `Move from ${turnStatus.move[0].from} to ${turnStatus.move[0].to} is invalid`
: "Sequence of moves is invalid : " +
: "Sequence of moves is invalid : \n" +
turnStatus.move
.map((m) => `\n-> Move from ${m.from} to ${m.to}`)
.join("")
.map((m) => `-> Move from ${m.from} to ${m.to}`)
.join("\n")
: "No move provided",
msgType: ConsoleMessageType.Warning,
})
Expand Down Expand Up @@ -277,9 +277,9 @@ export default function Home({ username }: { username: string }) {
<b>Human Player:</b> {player}
</p>
{consoleOutput.map((line, i) => (
<p key={i} className={line.msgType}>
<pre key={i} className={line.msgType}>
{line.msg}
</p>
</pre>
))}
</div>
</div>
Expand Down

0 comments on commit 651f5ef

Please sign in to comment.