Skip to content
This repository has been archived by the owner on Dec 6, 2022. It is now read-only.

Commit

Permalink
Fix player type selection
Browse files Browse the repository at this point in the history
  • Loading branch information
j-era committed Aug 26, 2019
1 parent 444de07 commit 48e2f16
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions game-client/src/components/pages/playerTypeSelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ const Buttons = styled.div `
export default function PlayerTypeSelection({ content, dispatch }) {
const types = useMemo(() => Object.entries(content)
.filter(([, value]) => value.template && value.template === "challenges")
.map(([, value]) => value.typeName), [content])
.map(([key, value]) => [key, value.typeName]), [content])

return (
<Container>
Expand All @@ -42,14 +42,14 @@ export default function PlayerTypeSelection({ content, dispatch }) {
<Buttons>
{
types.map(
type =>
([key, typeName]) =>
<NextButton
visible
key={ type }
key={ key }
onClick={ () => {
dispatch(startNewGame(type))
dispatch(startNewGame(key))
} }
text={ type } />
text={ typeName } />
)
}
</Buttons>
Expand Down

0 comments on commit 48e2f16

Please sign in to comment.