Skip to content

Commit

Permalink
[fix] leaderboard click error
Browse files Browse the repository at this point in the history
  • Loading branch information
Reqwey committed Sep 25, 2023
1 parent f6cd09e commit 0924c25
Showing 1 changed file with 16 additions and 4 deletions.
20 changes: 16 additions & 4 deletions client/components/game/LeaderBoard.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -82,15 +82,15 @@ export default function LeaderBoard(props: LeaderBoardProps) {
? { xs: '0.6rem', md: '0.8rem' }
: { xs: '0.4rem', md: '0.6rem' },
},
boxShadow: 1
}}
onClick={() => {
setGameDockExpand(!gameDockExpand);
boxShadow: 1,
}}
>
<TableHead>
<TableRow
sx={{ backgroundColor: 'transparent', whiteSpace: 'nowrap' }}
onClick={() => {
setGameDockExpand(!gameDockExpand);
}}
>
{warringStatesMode && (
<TableCell align='center'>{t('country')}</TableCell>
Expand Down Expand Up @@ -150,6 +150,9 @@ export default function LeaderBoard(props: LeaderBoardProps) {
sx={{
backgroundColor: ColorArr[player.color],
}}
onClick={() => {
setGameDockExpand(!gameDockExpand);
}}
>
{player.username}
</TableCell>
Expand All @@ -159,15 +162,24 @@ export default function LeaderBoard(props: LeaderBoardProps) {
padding: '3px',
backgroundColor: ColorArr[player.color],
}}
onClick={() => {
setGameDockExpand(!gameDockExpand);
}}
></TableCell>
)}
<TableCell
align='center'
onClick={() => {
setGameDockExpand(!gameDockExpand);
}}
>
{player.armyCount}
</TableCell>
<TableCell
align='center'
onClick={() => {
setGameDockExpand(!gameDockExpand);
}}
>
{player.landsCount}
</TableCell>
Expand Down

0 comments on commit 0924c25

Please sign in to comment.