|
@@ -7,6 +7,7 @@ const Tile = styled.div`
|
|
flex-flow: column nowrap;
|
|
flex-flow: column nowrap;
|
|
justify-content: flex-start;
|
|
justify-content: flex-start;
|
|
align-items: center;
|
|
align-items: center;
|
|
|
|
+ min-width: 10em;
|
|
`
|
|
`
|
|
|
|
|
|
const Name = styled.span`
|
|
const Name = styled.span`
|
|
@@ -16,19 +17,20 @@ const Name = styled.span`
|
|
|
|
|
|
const TotalScore = styled.span`
|
|
const TotalScore = styled.span`
|
|
font-size: 1.1em;
|
|
font-size: 1.1em;
|
|
|
|
+ margin-left: .5em;
|
|
`
|
|
`
|
|
|
|
|
|
-const List = styled.ul`
|
|
|
|
|
|
+const List = styled.div`
|
|
display: flex;
|
|
display: flex;
|
|
flex-flow: column nowrap;
|
|
flex-flow: column nowrap;
|
|
justify-content: center;
|
|
justify-content: center;
|
|
align-items: flex-start;
|
|
align-items: flex-start;
|
|
margin-bottom: 20%;
|
|
margin-bottom: 20%;
|
|
|
|
+ margin-left: 1em;
|
|
list-style: none;
|
|
list-style: none;
|
|
`
|
|
`
|
|
|
|
|
|
-const Score = styled.li`
|
|
|
|
- flex: 1;
|
|
|
|
|
|
+const Score = styled.span`
|
|
`
|
|
`
|
|
|
|
|
|
export default ({ name, guesses, totalScore }) => (
|
|
export default ({ name, guesses, totalScore }) => (
|
|
@@ -38,9 +40,9 @@ export default ({ name, guesses, totalScore }) => (
|
|
<List>
|
|
<List>
|
|
{
|
|
{
|
|
["1", "2", "3", "4", "5"]
|
|
["1", "2", "3", "4", "5"]
|
|
- .map(key => {
|
|
|
|
- const score = guesses[key]?.score
|
|
|
|
- return score !== undefined ? <Score key={key}>{score}</Score> : null
|
|
|
|
|
|
+ .map(num => {
|
|
|
|
+ const score = guesses[num]?.score
|
|
|
|
+ return score !== undefined ? <Score key={num}>{num}: {score}</Score> : null
|
|
})
|
|
})
|
|
}
|
|
}
|
|
</List>
|
|
</List>
|