|
@@ -10,7 +10,15 @@ const RecentGames = () => {
|
|
|
<div className={styles.recentSection}>
|
|
|
<div className={styles.recentTitle}>Recently Created Games:</div>
|
|
|
{recent?.map(
|
|
|
- ({ gameId, gameMode, clockMode, rounds, timer, player, numPlayers }) => (
|
|
|
+ ({
|
|
|
+ gameId,
|
|
|
+ gameMode,
|
|
|
+ clockMode,
|
|
|
+ rounds,
|
|
|
+ timer,
|
|
|
+ player,
|
|
|
+ numPlayers,
|
|
|
+ }) => (
|
|
|
<button
|
|
|
key={gameId}
|
|
|
type="button"
|
|
@@ -18,12 +26,15 @@ const RecentGames = () => {
|
|
|
onClick={() => dispatch.goToLobby(gameId)}
|
|
|
>
|
|
|
<div>
|
|
|
- {clockMode === RACE ? "Duel" : gameMode
|
|
|
- .split("_")
|
|
|
- .map(
|
|
|
- part => part[0].toUpperCase() + part.slice(1).toLowerCase()
|
|
|
- )
|
|
|
- .join(" ")}
|
|
|
+ {clockMode === RACE
|
|
|
+ ? "Duel"
|
|
|
+ : gameMode
|
|
|
+ .split("_")
|
|
|
+ .map(
|
|
|
+ part =>
|
|
|
+ part[0].toUpperCase() + part.slice(1).toLowerCase()
|
|
|
+ )
|
|
|
+ .join(" ")}
|
|
|
,
|
|
|
{rounds} round(s),
|
|
|
{ms(timer * 1000)}
|